Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/emc/usr_intf/gmoccapy/gmoccapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3175,13 +3175,16 @@ def on_window1_destroy(self, widget, data=None):
Gtk.main_quit()

def on_focus_out(self, widget, data=None):
LOG.debug("focus-out-event")
self.stat.poll()
if self.stat.enabled and self.stat.task_mode == linuxcnc.MODE_MANUAL and self.stat.current_vel > 0:
# cancel any joints jogging
JOGMODE = self._get_jog_mode()
for jnum in range(self.stat.joints):
self.command.jog(linuxcnc.JOG_STOP, JOGMODE, jnum)
LOG.debug("Stopped jogging on focus-out-event")
# don't cancel if the joint is homing
if not self.stat.joint[jnum]["homing"]:
self.command.jog(linuxcnc.JOG_STOP, JOGMODE, jnum)
LOG.debug("Stopped jogging for joint %d on focus-out-event" % (jnum))

# What to do if a macro button has been pushed
def _on_btn_macro_pressed( self, widget = None, data = None ):
Expand Down
Loading