(Add-by-IP/onboard) Cleanup and use discovered-printer instead of machine-manager. [CURA-6294]

This commit is contained in:
Remco Burema 2019-03-14 13:33:24 +01:00
parent 61821e6378
commit 2693eecd33
3 changed files with 20 additions and 11 deletions

View file

@ -126,3 +126,11 @@ class DiscoveredPrintersModel(QObject):
@pyqtSlot("QVariant")
def createMachineFromDiscoveredPrinter(self, discovered_printer: "DiscoveredPrinter") -> None:
discovered_printer.create_callback(discovered_printer.getKey())
@pyqtSlot(str)
def createMachineFromDiscoveredPrinterAddress(self, ip_address: str) -> None:
if ip_address not in self._discovered_printer_dict:
Logger.log("i", "Key [%s] does not exist in the discovered printers list.", ip_address)
return
self.createMachineFromDiscoveredPrinter(self._discovered_printer_dict[ip_address])