Browse Source

Fix a direct signal emission that causes max recursion error

CURA-5682

A max recursion error will occur when the user creates a material on the
material management page. Too many signals get directly triggered and
some of them head back again and causes a max recursion error.
Lipu Fei 6 years ago
parent
commit
fe8aa02e7c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cura/Settings/CuraContainerStack.py

+ 1 - 1
cura/Settings/CuraContainerStack.py

@@ -291,7 +291,7 @@ class CuraContainerStack(ContainerStack):
 
     # Helper to make sure we emit a PyQt signal on container changes.
     def _onContainersChanged(self, container: Any) -> None:
-        self.pyqtContainersChanged.emit()
+        Application.getInstance().callLater(self.pyqtContainersChanged.emit)
 
     # Helper that can be overridden to get the "machine" definition, that is, the definition that defines the machine
     # and its properties rather than, for example, the extruder. Defaults to simply returning the definition property.