Fix extra qpainter end() call

This commit is contained in:
Kovid Goyal 2023-09-06 11:59:36 +05:30
parent 705c174271
commit 5082280c0e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -371,7 +371,6 @@ class ImageView(QWidget, ImageDropMixin):
pmap = self._pixmap
p = QPainter(self)
p.setRenderHints(QPainter.RenderHint.Antialiasing | QPainter.RenderHint.SmoothPixmapTransform)
try:
if pmap.isNull():
if self.draw_empty_border:
pen = QPen()
@ -399,8 +398,6 @@ class ImageView(QWidget, ImageDropMixin):
p.drawRect(target)
if self.show_size:
draw_size(p, target, ow, oh)
finally:
p.end()
# }}}