There is now a hard and a soft discovery mode

CURA-2086
This commit is contained in:
Jaime van Kessel 2016-08-11 10:36:21 +02:00
parent bd7e8e4c52
commit 2bbeeb3389
2 changed files with 6 additions and 2 deletions

View file

@ -23,8 +23,12 @@ class DiscoverUM3Action(MachineAction):
self._network_plugin.addPrinterSignal.connect(self._onPrinterDiscoveryChanged)
self._network_plugin.removePrinterSignal.connect(self._onPrinterDiscoveryChanged)
self.printersChanged.emit()
@pyqtSlot()
def restartDiscovery(self):
if not self._network_plugin:
self.startDiscovery()
else:
# Restart bonjour discovery
self._network_plugin.startDiscovery()
def _onPrinterDiscoveryChanged(self, *args):

View file

@ -70,7 +70,7 @@ Cura.MachineAction
{
id: rediscoverButton
text: catalog.i18nc("@title", "Refresh")
onClicked: manager.startDiscovery()
onClicked: manager.restartDiscovery()
anchors.right: parent.right
anchors.rightMargin: parent.width * 0.5
}