Skip to content

Commit

Permalink
gmoccapy: disable SourceView only in auto mode and only when running …
Browse files Browse the repository at this point in the history
…(mainly to not hide the progressbar)
  • Loading branch information
hansu committed Nov 23, 2024
1 parent 889c2a3 commit d711312
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/emc/usr_intf/gmoccapy/gmoccapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def __init__(self, argv):
self.widgets.chk_toggle_readout.set_active(self.toggle_readout)

self.widgets.adj_start_spindle_RPM.set_value(self.spindle_start_rpm)
self.widgets.gcode_view.set_sensitive(False)
self.widgets.gcode_view.set_editable(False)
self.widgets.ntb_user_tabs.remove_page(0)

# call the function to change the button status
Expand Down Expand Up @@ -2576,7 +2576,7 @@ def on_hal_status_interp_idle(self, widget):
if self.load_tool:
return

widgetlist = ["ntb_jog", "btn_from_line",
widgetlist = ["ntb_jog", "btn_from_line", "gcode_view",
"tbtn_flood", "tbtn_mist", "rbt_forward", "rbt_reverse", "rbt_stop",
"btn_load", "btn_edit", "tbtn_optional_blocks", "btn_reload"
]
Expand Down Expand Up @@ -2634,7 +2634,7 @@ def on_hal_status_interp_run(self, widget):
]
# in MDI it should be possible to add more commands, even if the interpreter is running
if self.stat.task_mode != linuxcnc.MODE_MDI:
widgetlist.append("ntb_jog")
widgetlist.append("gcode_view")

self._sensitize_widgets(widgetlist, False)
self.widgets.btn_run.set_sensitive(False)
Expand Down Expand Up @@ -5212,7 +5212,7 @@ def on_btn_edit_clicked(self, widget, data=None):
self.widgets.box_dro_side.hide()
if not self.widgets.vbx_jog.get_visible():
self.widgets.vbx_jog.set_visible(True)
self.widgets.gcode_view.set_sensitive(True)
self.widgets.gcode_view.set_editable(True)
self.widgets.gcode_view.grab_focus()
if self.widgets.chk_use_kb_on_edit.get_active():
self.widgets.ntb_info.set_current_page(1)
Expand Down Expand Up @@ -5289,7 +5289,7 @@ def on_ntb_button_switch_page(self, *args):
self.widgets.vbox14.show()
self.widgets.box_dro_side.show()
self.widgets.hbox2.set_position(self.hbox2_position)
self.widgets.gcode_view.set_sensitive(False)
self.widgets.gcode_view.set_editable(False)
self.widgets.btn_save.set_sensitive(True)
self.widgets.hal_action_reload.emit("activate")
self.widgets.ntb_info.set_current_page(0)
Expand Down Expand Up @@ -5331,7 +5331,7 @@ def on_tbtn_optional_blocks_toggled(self, widget, data=None):
# this can not be done with the status widget,
# because it will not emit a RESUME signal
def on_tbtn_pause_toggled(self, widget, data=None):
widgetlist = ["rbt_forward", "rbt_reverse", "rbt_stop", "ntb_jog"]
widgetlist = ["rbt_forward", "rbt_reverse", "rbt_stop", "gcode_view"]
self._sensitize_widgets(widgetlist, widget.get_active())
widget.set_image(self.widgets["img_pause_active" if widget.get_active() else "img_pause"])

Expand Down

0 comments on commit d711312

Please sign in to comment.