Fix warning about inactive QPainter.

This commit is contained in:
John Preston 2021-11-02 16:14:10 +04:00
parent 53e39e37eb
commit 4907cf35d1

View file

@ -104,7 +104,7 @@ public:
const PainterHighQualityEnabler &other) = delete; const PainterHighQualityEnabler &other) = delete;
~PainterHighQualityEnabler() { ~PainterHighQualityEnabler() {
if (_hints) { if (_hints && _painter.isActive()) {
_painter.setRenderHints(_hints, false); _painter.setRenderHints(_hints, false);
} }
} }