mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
There is now a hard and a soft discovery mode
CURA-2086
This commit is contained in:
parent
bd7e8e4c52
commit
2bbeeb3389
2 changed files with 6 additions and 2 deletions
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue