Fix material update upon extruder-compatible diameter change

CURA-5834

Material models and the material container on an extruder need to be
updated when the extruder's compatible diameter gets changes.
This commit is contained in:
Lipu Fei 2018-10-19 13:48:50 +02:00
parent ea10d5e608
commit 97e6354c13
6 changed files with 59 additions and 20 deletions

View file

@ -64,9 +64,11 @@ class BaseMaterialsModel(ListModel):
if self._extruder_stack is not None:
self._extruder_stack.pyqtContainersChanged.disconnect(self._update)
self._extruder_stack.approximateMaterialDiameterChanged.disconnect(self._update)
self._extruder_stack = global_stack.extruders.get(str(self._extruder_position))
if self._extruder_stack is not None:
self._extruder_stack.pyqtContainersChanged.connect(self._update)
self._extruder_stack.approximateMaterialDiameterChanged.connect(self._update)
# Force update the model when the extruder stack changes
self._update()