Add "refresh" button to list of network printers

CURA-2035
This commit is contained in:
fieldOfView 2016-08-09 15:18:57 +02:00
parent bd6e36f487
commit 7f83c22f74
3 changed files with 24 additions and 1 deletions

View file

@ -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.