mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Linking a key to a printer now re-checks connection
CURA-336
This commit is contained in:
parent
bb9d3a47ef
commit
a61ac82433
2 changed files with 6 additions and 2 deletions
|
@ -39,3 +39,7 @@ class DiscoverUM3Action(MachineAction):
|
|||
global_container_stack.setMetaDataEntry("key", key)
|
||||
else:
|
||||
global_container_stack.addMetaDataEntry("key", key)
|
||||
|
||||
if self._network_plugin:
|
||||
# Ensure that the connection states are refreshed.
|
||||
self._network_plugin.reCheckConnections()
|
||||
|
|
|
@ -19,7 +19,7 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
|||
|
||||
# Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
|
||||
self.addPrinterSignal.connect(self.addPrinter)
|
||||
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalStackChanged)
|
||||
Application.getInstance().globalContainerStackChanged.connect(self.reCheckConnections)
|
||||
|
||||
addPrinterSignal = Signal()
|
||||
|
||||
|
@ -34,7 +34,7 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
|||
def getPrinters(self):
|
||||
return self._printers
|
||||
|
||||
def _onGlobalStackChanged(self):
|
||||
def reCheckConnections(self):
|
||||
active_machine = Application.getInstance().getGlobalContainerStack()
|
||||
if not active_machine:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue