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.
This commit is contained in:
Lipu Fei 2018-09-24 11:44:53 +02:00
parent b44fb7ca24
commit fe8aa02e7c

View File

@ -291,7 +291,7 @@ class CuraContainerStack(ContainerStack):
# Helper to make sure we emit a PyQt signal on container changes. # Helper to make sure we emit a PyQt signal on container changes.
def _onContainersChanged(self, container: Any) -> None: 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 # 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. # and its properties rather than, for example, the extruder. Defaults to simply returning the definition property.