Skip to content

Commit 06baddc

Browse files
committed
QwtPlotCanvas.setPaintAttribute: fixed PyQt4 compatibility issue for BackingStore paint attribute
1 parent 6893b43 commit 06baddc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

qwt/plot_canvas.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,8 @@ def setPaintAttribute(self, attribute, on=True):
467467
if QT_VERSION >= 0x050000:
468468
self.__data.backingStore = self.grab(self.rect())
469469
else:
470-
if PYQT5:
471-
pm = QPixmap.grabWidget(self, self.rect())
472-
else:
473-
pm = self.grab(self.rect())
474-
self.__data.backingStore = pm
470+
self.__data.backingStore = QPixmap.grabWidget(self,
471+
self.rect())
475472
else:
476473
self.__data.backingStore = None
477474
elif attribute == self.Opaque:

0 commit comments

Comments
 (0)