mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
Override connect() rather than connecting to connection state signal
This is much more lean and a bit more semantic. Contributes to issue CURA-5034.
This commit is contained in:
parent
a4171dd561
commit
da5e4c11a4
1 changed files with 3 additions and 5 deletions
|
@ -62,8 +62,6 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||
# See comments about this hack with the clusterPrintersChanged signal
|
||||
self.printersChanged.connect(self.clusterPrintersChanged)
|
||||
|
||||
self.connectionStateChanged.connect(self._onConnectionStateChanged)
|
||||
|
||||
self._accepts_commands = True
|
||||
|
||||
# Cluster does not have authentication, so default to authenticated
|
||||
|
@ -371,9 +369,9 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||
self._finished_jobs = finished_jobs
|
||||
|
||||
## Called when the connection to the cluster changes.
|
||||
def _onConnectionStateChanged(self) -> None:
|
||||
if self.connectionState == ConnectionState.connected:
|
||||
self.sendMaterialProfiles()
|
||||
def connect(self) -> None:
|
||||
super().connect()
|
||||
self.sendMaterialProfiles()
|
||||
|
||||
def _update(self) -> None:
|
||||
if not super()._update():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue