Skip to content

Commit 80d4062

Browse files
committed
fixes graph bounce and jitter when moving cursor in the designer
1 parent 21bd83c commit 80d4062

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/artisanlib/canvas.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17875,7 +17875,7 @@ def phases_to_messageline(self) -> None:
1787517875
string2 = f" <font color = \"{text_color_rect2[:7]}\" style=\"BACKGROUND-COLOR: {self.palette['rect2'][:7]}\">{margin} {stringfromseconds(midphasetime)} {margin} {midphaseP}% {margin} {midroc} {margin}</font>"
1787617876
text_color_rect3 = '#ffffff' if self.aw.QColorBrightness(QColor(self.palette['rect3'])) < 128 else '#000000'
1787717877
string3 = f" <font color = \"{text_color_rect3[:7]}\" style=\"BACKGROUND-COLOR: {self.palette['rect3'][:7]}\">{margin} {stringfromseconds(finishphasetime)} {margin} {finishphaseP}% {margin} {finishroc} {margin}</font>"
17878-
self.aw.sendmessage(f'<PRE>{string1}{string2}{string3}</PRE>',append=False)
17878+
self.aw.sendmessage(f'{string1}{string2}{string3}',append=False)
1787917879

1788017880
#handler for moving point
1788117881
def on_motion(self, event:'MouseEvent') -> None:
@@ -17934,6 +17934,7 @@ def on_motion(self, event:'MouseEvent') -> None:
1793417934

1793517935
orange_hit = False
1793617936
blue_hit = False
17937+
orange_blue_msg_sent = False
1793717938
if self.ax is not None and xdata is not None and ydata is not None: #outside graph type is None
1793817939
for i,_ in enumerate(self.timex):
1793917940
if abs(xdata - self.timex[i]) < 7.:
@@ -17983,6 +17984,7 @@ def on_motion(self, event:'MouseEvent') -> None:
1798317984
elif index == 7:
1798417985
timez = stringfromseconds(self.timex[self.timeindex[7]] - self.timex[self.timeindex[0]])
1798517986
self.aw.sendmessage(QApplication.translate('Message', '[ COOL ]') + ' ' + timez, style="background-color:'#6FB5D1';",append=False)
17987+
orange_blue_msg_sent = True
1798617988
break
1798717989
axfig = self.ax.get_figure()
1798817990
if self.BTcurve and abs(self.temp2[i] - ydata) < 10:
@@ -18006,6 +18008,7 @@ def on_motion(self, event:'MouseEvent') -> None:
1800618008
self.fig.canvas.flush_events()
1800718009
timez = stringfromseconds(self.timex[i] - self.timex[self.timeindex[0]])
1800818010
self.aw.sendmessage(timez,style="background-color:'lightblue';",append=False)
18011+
orange_blue_msg_sent = True
1800918012
break
1801018013
draw_idle = False
1801118014
if not orange_hit and self._designer_orange_mark_shown and self._designer_orange_mark is not None:
@@ -18025,7 +18028,8 @@ def on_motion(self, event:'MouseEvent') -> None:
1802518028
self.setCursor(Qt.CursorShape.OpenHandCursor)
1802618029
else:
1802718030
self.setCursor(Qt.CursorShape.PointingHandCursor) # Qt.CursorShape.PointingHandCursor or Qt.CursorShape.ArrowCursor
18028-
self.phases_to_messageline()
18031+
if not orange_blue_msg_sent:
18032+
self.phases_to_messageline()
1802918033

1803018034

1803118035
except Exception as e: # pylint: disable=broad-except

wiki/ReleaseHistory.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ v3.2.1
2222
- fixes regression which broke the import of roast profiles exported from Cropster, Giesen, IKAWA, Loring, Petroncini, RoastLog, RoastPath, ROEST, Rubasse, and Stronghold
2323
- fixes event buttons bottom row not rendered properly in all cases
2424
- fixes number of rendered event buttons rows
25+
- fixes graph bounce and jitter when moving the cursor in the designer
2526

2627
----
2728
v3.2.0 (June 23, 2025)

0 commit comments

Comments
 (0)