mirror of
https://github.com/pyapp-kit/superqt.git
synced 2025-07-21 20:21:07 +02:00
End painter when drawing colormap (#262)
* End painter when drawing colormap * Only end painter if we created it
This commit is contained in:
@@ -121,6 +121,10 @@ def draw_colormap(
|
||||
painter.setBrush(gradient)
|
||||
painter.drawRect(rect)
|
||||
|
||||
# If we created a new Painter, free its resources
|
||||
if isinstance(painter_or_device, QPaintDevice):
|
||||
painter.end()
|
||||
|
||||
|
||||
def _draw_checkerboard(
|
||||
painter: QPainter, rect: QRect | QRectF, checker_size: int
|
||||
|
Reference in New Issue
Block a user