Some fixes and cleanup for the network plugin

This commit is contained in:
ChrisTerBeke 2019-08-05 19:37:35 +02:00
parent 91d582622f
commit a1b986fd3a
No known key found for this signature in database
GPG key ID: A49F1AB9D7E0C263
10 changed files with 94 additions and 55 deletions

View file

@ -14,7 +14,7 @@ from cura.PrinterOutput.PrinterOutputDevice import ConnectionType
from .Utils import formatTimeCompleted, formatDateCompleted
from .ClusterOutputController import ClusterOutputController
from .PrintJobUploadProgressMessage import PrintJobUploadProgressMessage
from plugins.UM3NetworkPrinting.src.Messages.PrintJobUploadProgressMessage import PrintJobUploadProgressMessage
from .Models.UM3PrintJobOutputModel import UM3PrintJobOutputModel
from .Models.Http.ClusterPrinterStatus import ClusterPrinterStatus
from .Models.Http.ClusterPrintJobStatus import ClusterPrintJobStatus
@ -45,6 +45,9 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice):
# Trigger the printersChanged signal when the private signal is triggered.
self.printersChanged.connect(self._clusterPrintersChanged)
# Set the display name from the properties
self.setName(self.getProperty("name"))
# Keeps track of all printers in the cluster.
self._printers = [] # type: List[PrinterOutputModel]