@@ -22,10 +22,10 @@ def __init__(self, parent: QObject = None) -> None:
2222 super ().__init__ ("DuetRRFAction" , catalog .i18nc ("@action" , "Connect Duet RepRapFirmware" ))
2323
2424 self ._qml_url = os .path .join (os .path .dirname (os .path .abspath (__file__ )), 'resources' , 'qml' , 'DuetRRFAction.qml' )
25- self ._application = CuraApplication .getInstance ()
2625
26+ self ._application = CuraApplication .getInstance ()
27+ self ._application .globalContainerStackChanged .connect (self ._onGlobalContainerStackChanged )
2728 ContainerRegistry .getInstance ().containerAdded .connect (self ._onContainerAdded )
28- CuraApplication .getInstance ().globalContainerStackChanged .connect (self ._onGlobalContainerStackChanged )
2929
3030 def _onGlobalContainerStackChanged (self ) -> None :
3131 self .printerSettingsUrlChanged .emit ()
@@ -89,10 +89,16 @@ def saveConfig(self, url, duet_password, http_user, http_password):
8989 save_config (url , duet_password , http_user , http_password )
9090 Logger .log ("d" , "config saved" )
9191
92+ # trigger a stack change to reload the output devices
93+ self ._application .globalContainerStackChanged .emit ()
94+
9295 @pyqtSlot ()
9396 def deleteConfig (self ):
9497 if delete_config ():
9598 Logger .log ("d" , "config deleted" )
99+
100+ # trigger a stack change to reload the output devices
101+ self ._application .globalContainerStackChanged .emit ()
96102 else :
97103 Logger .log ("d" , "no config to delete" )
98104
0 commit comments