mirror of
https://github.com/pyapp-kit/superqt.git
synced 2025-12-16 03:00:05 +01: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.setBrush(gradient)
|
||||||
painter.drawRect(rect)
|
painter.drawRect(rect)
|
||||||
|
|
||||||
|
# If we created a new Painter, free its resources
|
||||||
|
if isinstance(painter_or_device, QPaintDevice):
|
||||||
|
painter.end()
|
||||||
|
|
||||||
|
|
||||||
def _draw_checkerboard(
|
def _draw_checkerboard(
|
||||||
painter: QPainter, rect: QRect | QRectF, checker_size: int
|
painter: QPainter, rect: QRect | QRectF, checker_size: int
|
||||||
|
|||||||
Reference in New Issue
Block a user