fix (Python): balance save/restore in XTachometer draw
_draw_tachometer did 4 cr.save() but only 3 cr.restore(): the save before the tick loop was never restored, so Widget.draws restore popped the wrong level and the widgets translate+clip leaked into the next widget drawn on the same area (anything drawn after a tachometer rendered blank / misplaced). All other monitor draws are balanced.
This commit is contained in:
1 parent
03065d35bf
commit
b4add9ba7b
1 file changed
+1
@@ -1193,6 +1193,7 @@ class MonitorWidget(Widget):
|
||||
ly = cy + (r - 26) * math.sin(ang) + 3
|
||||
_wtext(cr, self, label, lx, ly, size=9, rgb=_TEXT,
|
||||
align="center")
|
||||
cr.restore()
|
||||
# Peak-hold tick.
|
||||
cr.save()
|
||||
_rgb(cr, _WHITE)
|
||||
|
||||
Reference in new issue
Block a user