@@ -157,6 +157,7 @@ def __init__(self, halcomp, widgets, paths):
157157 STATUS .connect ('macro-call-request' , lambda w , name : self .request_macro_call (name ))
158158 STATUS .connect ('ok-request' , lambda w , state : self .dialog_ext_control (w ,1 ,1 ))
159159 STATUS .connect ('cancel-request' , lambda w , state : self .dialog_ext_control (w ,1 ,0 ))
160+ STATUS .connect ('axis-selection-changed' , lambda w ,data : self .mpg_selection_changed (data ))
160161
161162 self .swoopPath = os .path .join (paths .IMAGEDIR ,'lcnc_swoop.png' )
162163 self .swoopURL = QtCore .QUrl .fromLocalFile (self .swoopPath )
@@ -1418,6 +1419,16 @@ def btn_systemtool_toggled(self, state):
14181419 if state :
14191420 STATUS .emit ('dro-reference-change-request' , 1 )
14201421
1422+ def mpg_selection_changed (self , data ):
1423+ if data == 'MPG0' :
1424+ self .w .btn_mpg_scroll .setChecked (True )
1425+ self .recolorMPGFocusBorder ()
1426+ elif data == 'None' :
1427+ self .w .btn_mpg_scroll .group ().setExclusive (False )
1428+ self .w .btn_mpg_scroll .setChecked (False )
1429+ self .w .btn_mpg_scroll .group ().setExclusive (True )
1430+ self .removeMPGFocusBorder ()
1431+
14211432 def MPG_select_changed (self , button ):
14221433 #print(button)
14231434 # Auto exclusive doesn't allow unchecking all buttons
@@ -1437,8 +1448,10 @@ def MPG_select_changed(self, button):
14371448 if self .w .btn_mpg_scroll .isChecked ():
14381449 ACTION .SET_SELECTED_AXIS ('MPG0' )
14391450 self .recolorMPGFocusBorder ()
1440- else :
1451+ else :
14411452 self .removeMPGFocusBorder ()
1453+ else :
1454+ self .removeMPGFocusBorder ()
14421455
14431456 #self.set_statusbar('MPG output Selected: {}'.format(cmd.toolTip()),DEFAULT,noLog=True)
14441457 self ._lastSelectButton = button
0 commit comments