mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Add "refresh" button to list of network printers
CURA-2035
This commit is contained in:
parent
bd6e36f487
commit
7f83c22f74
3 changed files with 24 additions and 1 deletions
|
@ -29,6 +29,15 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
|||
|
||||
## Start looking for devices on network.
|
||||
def start(self):
|
||||
self.startDiscovery()
|
||||
|
||||
def startDiscovery(self):
|
||||
if self._browser:
|
||||
self._browser.cancel()
|
||||
self._browser = None
|
||||
self._printers = {}
|
||||
self._zero_conf.__init__()
|
||||
|
||||
self._browser = ServiceBrowser(self._zero_conf, u'_ultimaker._tcp.local.', [self._onServiceChanged])
|
||||
|
||||
## Stop looking for devices on network.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue