WIP: Implement refreshConnections()

This commit is contained in:
Lipu Fei 2019-03-13 15:34:18 +01:00
parent 20933e8bef
commit e5b51c8edf
2 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
self.addDeviceSignal.connect(self._onAddDevice)
self.removeDeviceSignal.connect(self._onRemoveDevice)
self._application.globalContainerStackChanged.connect(self.reCheckConnections)
self._application.globalContainerStackChanged.connect(self.refreshConnections)
self._discovered_devices = {}
@ -142,7 +142,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
self.addManualDevice(address)
self.resetLastManualDevice()
def reCheckConnections(self):
def refreshConnections(self):
active_machine = CuraApplication.getInstance().getGlobalContainerStack()
if not active_machine:
return
@ -233,7 +233,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
# connect the new machine to that network printer
self._application.getMachineManager().associateActiveMachineWithPrinterDevice(discovered_device)
# ensure that the connection states are refreshed.
self.reCheckConnections()
self.refreshConnections()
def _checkManualDevice(self, address):
# Check if a UM3 family device exists at this address.

View File

@ -62,7 +62,7 @@ Item
onRefreshButtonClicked:
{
// TODO: implement refresh
UM.OutputDeviceManager.refreshConnections()
}
onAddByIpButtonClicked: