mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 06:09:38 +08:00
WIP: Implement refreshConnections()
This commit is contained in:
parent
20933e8bef
commit
e5b51c8edf
@ -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.
|
||||
|
@ -62,7 +62,7 @@ Item
|
||||
|
||||
onRefreshButtonClicked:
|
||||
{
|
||||
// TODO: implement refresh
|
||||
UM.OutputDeviceManager.refreshConnections()
|
||||
}
|
||||
|
||||
onAddByIpButtonClicked:
|
||||
|
Loading…
x
Reference in New Issue
Block a user