Re-added manual printer adding

CL-541
This commit is contained in:
Jaime van Kessel 2017-12-20 16:30:40 +01:00
parent d66e9493ca
commit 041b1830fe
4 changed files with 128 additions and 7 deletions

View file

@ -12,7 +12,10 @@ from cura.MachineAction import MachineAction
catalog = i18nCatalog("cura")
class DiscoverUM3Action(MachineAction):
discoveredDevicesChanged = pyqtSignal()
def __init__(self):
super().__init__("DiscoverUM3Action", catalog.i18nc("@action","Connect via Network"))
self._qml_url = "DiscoverUM3Action.qml"
@ -30,8 +33,6 @@ class DiscoverUM3Action(MachineAction):
# Time to wait after a zero-conf service change before allowing a zeroconf reset
self._zero_conf_change_grace_period = 0.25
discoveredDevicesChanged = pyqtSignal()
@pyqtSlot()
def startDiscovery(self):
if not self._network_plugin:
@ -73,7 +74,7 @@ class DiscoverUM3Action(MachineAction):
self._network_plugin.removeManualDevice(key)
if address != "":
self._network_plugin.addManualPrinter(address)
self._network_plugin.addManualDevice(address)
def _onDeviceDiscoveryChanged(self, *args):
self._last_zero_conf_event_time = time.time()