mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 07:48:53 -07:00
Add documentation and further specify except around disconnecting signals
Catch just a TypeError instead of all exceptions. Added documentation to say why we catch a TypeError there. Also splitted up the try-except block for the 3 disconnects, just so that if the first fails we still try to disconnect from the other two. Contributes to issue CURA-3497.
This commit is contained in:
parent
d95488a940
commit
86f1a0559f
2 changed files with 8 additions and 2 deletions
|
|
@ -185,7 +185,7 @@ class PrintInformation(QObject):
|
|||
if self._active_material_container:
|
||||
try:
|
||||
self._active_material_container.metaDataChanged.disconnect(self._onMaterialMetaDataChanged)
|
||||
except TypeError:
|
||||
except TypeError: #pyQtSignal gives a TypeError when disconnecting from something that is already disconnected.
|
||||
pass
|
||||
|
||||
active_material_id = Application.getInstance().getMachineManager().activeMaterialId
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue