ImageWidget: Fix console spam about QPainter not being active
This commit is contained in:
parent
631e1b9b3c
commit
7ef5172d62
|
@ -52,7 +52,9 @@ class DownloadWidget(ImageWidget):
|
|||
# lk: trade some possible delay and start-up time
|
||||
# lk: for faster rendering. Gradients are expensive
|
||||
# lk: so pre-generate the image
|
||||
super(DownloadWidget, self).setPixmap(self.prepare_pixmap(pixmap))
|
||||
if not pixmap.isNull():
|
||||
pixmap = self.prepare_pixmap(pixmap)
|
||||
super(DownloadWidget, self).setPixmap(pixmap)
|
||||
|
||||
def paint_image_empty(self, painter: QPainter, a0: QPaintEvent) -> None:
|
||||
# when pixmap object is not available yet, show a gray rectangle
|
||||
|
|
|
@ -112,7 +112,9 @@ class ListGameWidget(GameWidget):
|
|||
# lk: trade some possible delay and start-up time
|
||||
# lk: for faster rendering. Gradients are expensive
|
||||
# lk: so pre-generate the image
|
||||
super(ListGameWidget, self).setPixmap(self.prepare_pixmap(pixmap))
|
||||
if not pixmap.isNull():
|
||||
pixmap = self.prepare_pixmap(pixmap)
|
||||
super(ListGameWidget, self).setPixmap(pixmap)
|
||||
|
||||
def paint_image_cover(self, painter: QPainter, a0: QPaintEvent) -> None:
|
||||
painter.setOpacity(self._opacity)
|
||||
|
|
Loading…
Reference in a new issue