mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-17 11:47:50 -06:00
Do not limit containersChanged methods to a single container type
This may trigger a few extra updates, but allows us to use signal compression in the postponesignals context manager, which greatly improves performance.
This commit is contained in:
parent
927055806c
commit
0292756ad7
2 changed files with 5 additions and 9 deletions
|
@ -105,7 +105,6 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
||||||
|
|
||||||
def _onExtruderStackContainersChanged(self, container):
|
def _onExtruderStackContainersChanged(self, container):
|
||||||
# The ExtrudersModel needs to be updated when the material-name or -color changes, because the user identifies extruders by material-name
|
# The ExtrudersModel needs to be updated when the material-name or -color changes, because the user identifies extruders by material-name
|
||||||
if container.getMetaDataEntry("type") == "material":
|
|
||||||
self._updateExtruders()
|
self._updateExtruders()
|
||||||
|
|
||||||
modelChanged = pyqtSignal()
|
modelChanged = pyqtSignal()
|
||||||
|
|
|
@ -287,11 +287,8 @@ class MachineManager(QObject):
|
||||||
def _onInstanceContainersChanged(self, container):
|
def _onInstanceContainersChanged(self, container):
|
||||||
container_type = container.getMetaDataEntry("type")
|
container_type = container.getMetaDataEntry("type")
|
||||||
|
|
||||||
if container_type == "material":
|
|
||||||
self.activeMaterialChanged.emit()
|
|
||||||
elif container_type == "variant":
|
|
||||||
self.activeVariantChanged.emit()
|
self.activeVariantChanged.emit()
|
||||||
elif container_type == "quality":
|
self.activeMaterialChanged.emit()
|
||||||
self.activeQualityChanged.emit()
|
self.activeQualityChanged.emit()
|
||||||
|
|
||||||
self._updateStacksHaveErrors()
|
self._updateStacksHaveErrors()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue