mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Empty containers now also trigger extruder model update
This commit is contained in:
parent
27d6bebf32
commit
fd340a1270
1 changed files with 3 additions and 2 deletions
|
@ -117,10 +117,12 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
||||||
self._active_extruder_stack = active_extruder_stack
|
self._active_extruder_stack = active_extruder_stack
|
||||||
|
|
||||||
def _onExtruderStackContainersChanged(self, container):
|
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
|
# The ExtrudersModel needs to be updated when the material-name or -color changes, because the user identifies extruders by material-name
|
||||||
self._updateExtruders()
|
self._updateExtruders()
|
||||||
|
|
||||||
|
|
||||||
modelChanged = pyqtSignal()
|
modelChanged = pyqtSignal()
|
||||||
|
|
||||||
def _updateExtruders(self):
|
def _updateExtruders(self):
|
||||||
|
@ -137,7 +139,6 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
||||||
changed = True
|
changed = True
|
||||||
|
|
||||||
items = []
|
items = []
|
||||||
|
|
||||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
if global_container_stack:
|
if global_container_stack:
|
||||||
if self._add_global:
|
if self._add_global:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue