mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Don't register devices needlessly, for now remove initial update
This commit is contained in:
parent
8c4f8e8979
commit
2fb1311d93
2 changed files with 18 additions and 11 deletions
|
@ -45,9 +45,6 @@ class LocalClusterOutputDevice(UltimakerNetworkedPrinterOutputDevice):
|
|||
self._setInterfaceElements()
|
||||
self._active_camera_url = QUrl() # type: QUrl
|
||||
|
||||
# Get the cluster configuration at least once to check if it is a host.
|
||||
self._update()
|
||||
|
||||
## Set all the interface elements and texts for this output device.
|
||||
def _setInterfaceElements(self) -> None:
|
||||
self.setPriority(3) # Make sure the output device gets selected above local file output
|
||||
|
|
|
@ -154,7 +154,17 @@ class LocalClusterOutputDeviceManager:
|
|||
break
|
||||
|
||||
device = LocalClusterOutputDevice(key, address, properties)
|
||||
CuraApplication.getInstance().getDiscoveredPrintersModel().addDiscoveredPrinter(
|
||||
discovered_printers_model = CuraApplication.getInstance().getDiscoveredPrintersModel()
|
||||
if address in list(discovered_printers_model.discoveredPrintersByAddress.keys()):
|
||||
# The printer was already added, we just update the available data.
|
||||
discovered_printers_model.updateDiscoveredPrinter(
|
||||
ip_address=address,
|
||||
name=device.getName(),
|
||||
machine_type=device.printerType
|
||||
)
|
||||
else:
|
||||
# The printer was not added yet so let's do that.
|
||||
discovered_printers_model.addDiscoveredPrinter(
|
||||
ip_address=address,
|
||||
key=device.getId(),
|
||||
name=device.getName(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue