mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
WIP: Implement refreshConnections()
This commit is contained in:
parent
20933e8bef
commit
e5b51c8edf
2 changed files with 4 additions and 4 deletions
|
@ -55,7 +55,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||||
self.addDeviceSignal.connect(self._onAddDevice)
|
self.addDeviceSignal.connect(self._onAddDevice)
|
||||||
self.removeDeviceSignal.connect(self._onRemoveDevice)
|
self.removeDeviceSignal.connect(self._onRemoveDevice)
|
||||||
|
|
||||||
self._application.globalContainerStackChanged.connect(self.reCheckConnections)
|
self._application.globalContainerStackChanged.connect(self.refreshConnections)
|
||||||
|
|
||||||
self._discovered_devices = {}
|
self._discovered_devices = {}
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||||
self.addManualDevice(address)
|
self.addManualDevice(address)
|
||||||
self.resetLastManualDevice()
|
self.resetLastManualDevice()
|
||||||
|
|
||||||
def reCheckConnections(self):
|
def refreshConnections(self):
|
||||||
active_machine = CuraApplication.getInstance().getGlobalContainerStack()
|
active_machine = CuraApplication.getInstance().getGlobalContainerStack()
|
||||||
if not active_machine:
|
if not active_machine:
|
||||||
return
|
return
|
||||||
|
@ -233,7 +233,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||||
# connect the new machine to that network printer
|
# connect the new machine to that network printer
|
||||||
self._application.getMachineManager().associateActiveMachineWithPrinterDevice(discovered_device)
|
self._application.getMachineManager().associateActiveMachineWithPrinterDevice(discovered_device)
|
||||||
# ensure that the connection states are refreshed.
|
# ensure that the connection states are refreshed.
|
||||||
self.reCheckConnections()
|
self.refreshConnections()
|
||||||
|
|
||||||
def _checkManualDevice(self, address):
|
def _checkManualDevice(self, address):
|
||||||
# Check if a UM3 family device exists at this address.
|
# Check if a UM3 family device exists at this address.
|
||||||
|
|
|
@ -62,7 +62,7 @@ Item
|
||||||
|
|
||||||
onRefreshButtonClicked:
|
onRefreshButtonClicked:
|
||||||
{
|
{
|
||||||
// TODO: implement refresh
|
UM.OutputDeviceManager.refreshConnections()
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddByIpButtonClicked:
|
onAddByIpButtonClicked:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue