mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 05:25:56 +08: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
@ -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…
x
Reference in New Issue
Block a user