mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:05:53 +08:00
There is now a hard and a soft discovery mode
CURA-2086
This commit is contained in:
parent
bd7e8e4c52
commit
2bbeeb3389
@ -23,8 +23,12 @@ class DiscoverUM3Action(MachineAction):
|
|||||||
self._network_plugin.addPrinterSignal.connect(self._onPrinterDiscoveryChanged)
|
self._network_plugin.addPrinterSignal.connect(self._onPrinterDiscoveryChanged)
|
||||||
self._network_plugin.removePrinterSignal.connect(self._onPrinterDiscoveryChanged)
|
self._network_plugin.removePrinterSignal.connect(self._onPrinterDiscoveryChanged)
|
||||||
self.printersChanged.emit()
|
self.printersChanged.emit()
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def restartDiscovery(self):
|
||||||
|
if not self._network_plugin:
|
||||||
|
self.startDiscovery()
|
||||||
else:
|
else:
|
||||||
# Restart bonjour discovery
|
|
||||||
self._network_plugin.startDiscovery()
|
self._network_plugin.startDiscovery()
|
||||||
|
|
||||||
def _onPrinterDiscoveryChanged(self, *args):
|
def _onPrinterDiscoveryChanged(self, *args):
|
||||||
|
@ -70,7 +70,7 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
id: rediscoverButton
|
id: rediscoverButton
|
||||||
text: catalog.i18nc("@title", "Refresh")
|
text: catalog.i18nc("@title", "Refresh")
|
||||||
onClicked: manager.startDiscovery()
|
onClicked: manager.restartDiscovery()
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: parent.width * 0.5
|
anchors.rightMargin: parent.width * 0.5
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user