Skip to content

Commit

Permalink
Merge pull request meerk40t#2663 from meerk40t/buttontimer-fix
Browse files Browse the repository at this point in the history
Fix hover issue on jog panel
  • Loading branch information
jpirnay authored Oct 23, 2024
2 parents c233361 + 5091f5a commit 079f1a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion meerk40t/gui/navigationpanels.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,11 @@ def start_timer(self, button=None):
self.timer.Start(int(self.interval * 1000))

def on_button_lost(self, event=None):
event.Skip()
self.stop_timer(action=False)

def on_button_down(self, event=None):
event.Skip()
self.stop_timer(action=False)
if event is None:
return
Expand All @@ -377,13 +379,15 @@ def on_button_down(self, event=None):

def on_button_up(self, event=None):
# That consumes the event and a wx.EVT_BUTTON will not be raised
event.Skip()
self.stop_timer(action=True)

def on_button_click(self, event=None):
# That could still happen due to a keypress
# (i.e. return, space) while the button has focus
if event is None:
return
event.Skip()
button = event.GetEventObject()
self.active_button = button
self.stop_timer(action=True)
Expand Down Expand Up @@ -942,7 +946,6 @@ def __init__(self, *args, context=None, **kwds):
self.button_confine = wxBitmapButton(self, wx.ID_ANY)
self.__set_properties()
self.__do_layout()

self.timer = TimerButtons(self)
self.timer.add_button(self.button_navigate_down, self.jog_down)
self.timer.add_button(self.button_navigate_left, self.jog_left)
Expand Down

0 comments on commit 079f1a3

Please sign in to comment.