mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
Replace only user changed values
removed machine_settings and settable_per_extruder_check. Not needed.
This commit is contained in:
parent
18fba5b529
commit
faf8ed3ba6
2 changed files with 8 additions and 9 deletions
|
@ -553,15 +553,14 @@ class MachineManager(QObject):
|
|||
## Copy the value of all settings of the current extruder to all other extruders as well as the global container.
|
||||
@pyqtSlot()
|
||||
def copyAllValuesToExtruders(self):
|
||||
for key in self._active_container_stack.getAllKeys() - set([machine_setting.key for machine_setting in self._active_container_stack.getProperty("machine_settings", "children")]):
|
||||
if self._active_container_stack.getProperty(key, "settable_per_extruder"):
|
||||
new_value = self._active_container_stack.getProperty(key, "value")
|
||||
extruder_stacks = [stack for stack in ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId())]
|
||||
for key in self._active_container_stack.userChanges.getAllKeys():
|
||||
new_value = self._active_container_stack.getProperty(key, "value")
|
||||
extruder_stacks = [stack for stack in ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId())]
|
||||
|
||||
# check in which stack the value has to be replaced
|
||||
for extruder_stack in extruder_stacks:
|
||||
if extruder_stack != self._active_container_stack and extruder_stack.getProperty(key, "value") != new_value:
|
||||
extruder_stack.userChanges.setProperty(key, "value", new_value) # TODO: nested property access, should be improved
|
||||
# check in which stack the value has to be replaced
|
||||
for extruder_stack in extruder_stacks:
|
||||
if extruder_stack != self._active_container_stack and extruder_stack.getProperty(key, "value") != new_value:
|
||||
extruder_stack.userChanges.setProperty(key, "value", new_value) # TODO: nested property access, should be improved
|
||||
|
||||
@pyqtProperty(str, notify = activeVariantChanged)
|
||||
def activeVariantName(self) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue