Re-filter list of printers when you open the window

When you open the window of a printer that already exists, it doesn't re-create the entire window and therefore didn't re-apply the filter on machine type.

This triggers the filter to be applied again.

Contributes to issue CURA-2475.
This commit is contained in:
Ghostkeeper 2016-10-06 14:33:42 +02:00
parent 9389149064
commit afd5df283c
No known key found for this signature in database
GPG key ID: 701948C5954A7385

View file

@ -39,6 +39,11 @@ class DiscoverUM3Action(MachineAction):
self._network_plugin.printerListChanged.connect(self._onPrinterDiscoveryChanged) self._network_plugin.printerListChanged.connect(self._onPrinterDiscoveryChanged)
self.printersChanged.emit() self.printersChanged.emit()
## Re-filters the list of printers.
@pyqtSlot()
def reset(self):
self.printersChanged.emit()
@pyqtSlot() @pyqtSlot()
def restartDiscovery(self): def restartDiscovery(self):
# Ensure that there is a bit of time after a printer has been discovered. # Ensure that there is a bit of time after a printer has been discovered.