mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Implement Adding, Editing and Removing manual printers
CURA-2384
This commit is contained in:
parent
eba49ee8c2
commit
578b4d3826
3 changed files with 42 additions and 8 deletions
|
@ -52,6 +52,22 @@ class DiscoverUM3Action(MachineAction):
|
|||
else:
|
||||
self._network_plugin.startDiscovery()
|
||||
|
||||
@pyqtSlot(str, str)
|
||||
def removeManualPrinter(self, key, address):
|
||||
if not self._network_plugin:
|
||||
return
|
||||
|
||||
self._network_plugin.removeManualPrinter(key, address)
|
||||
|
||||
@pyqtSlot(str, str)
|
||||
def setManualPrinter(self, key, address):
|
||||
if key != "":
|
||||
# This manual printer replaces a current manual printer
|
||||
self._network_plugin.removeManualPrinter(key)
|
||||
|
||||
if address != "":
|
||||
self._network_plugin.addManualPrinter(address)
|
||||
|
||||
def _onPrinterDiscoveryChanged(self, *args):
|
||||
self._last_zeroconf_event_time = time.time()
|
||||
self.printersChanged.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue