mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 10:33:15 +08:00
Empty containers now also trigger extruder model update
This commit is contained in:
parent
27d6bebf32
commit
fd340a1270
@ -117,10 +117,12 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
||||
self._active_extruder_stack = active_extruder_stack
|
||||
|
||||
def _onExtruderStackContainersChanged(self, container):
|
||||
if container.getMetaDataEntry("type") == "material":
|
||||
# Update when there is an empty container or material change
|
||||
if container.getMetaDataEntry("type") == "material" or container.getMetaDataEntry("type") is None:
|
||||
# The ExtrudersModel needs to be updated when the material-name or -color changes, because the user identifies extruders by material-name
|
||||
self._updateExtruders()
|
||||
|
||||
|
||||
modelChanged = pyqtSignal()
|
||||
|
||||
def _updateExtruders(self):
|
||||
@ -137,7 +139,6 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
||||
changed = True
|
||||
|
||||
items = []
|
||||
|
||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||
if global_container_stack:
|
||||
if self._add_global:
|
||||
|
Loading…
x
Reference in New Issue
Block a user