mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Replace material without needing to find its index
We have an easy setter for this. Contributes to issue CURA-3497.
This commit is contained in:
parent
b69f337ddb
commit
ea9e0e2e9c
1 changed files with 1 additions and 2 deletions
|
@ -704,8 +704,7 @@ class MachineManager(QObject):
|
|||
self.blurSettings.emit()
|
||||
old_material.nameChanged.disconnect(self._onMaterialNameChanged)
|
||||
|
||||
material_index = self._active_container_stack.getContainerIndex(old_material)
|
||||
self._active_container_stack.replaceContainer(material_index, material_container)
|
||||
self._active_container_stack.material = material_container
|
||||
Logger.log("d", "Active material changed")
|
||||
|
||||
material_container.nameChanged.connect(self._onMaterialNameChanged)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue