mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 07:38:58 +08:00
Settings that are not settable per extruder but used by settings who are are now also copied
CURA-2409
This commit is contained in:
parent
ddd4a46e76
commit
aac395cb79
@ -243,11 +243,11 @@ class MachineManager(QObject):
|
||||
|
||||
def _onPropertyChanged(self, key, property_name):
|
||||
if property_name == "value":
|
||||
# If a setting is not settable per extruder, but "has enabled relations" that are settable per extruder
|
||||
# If a setting is not settable per extruder, but "has enabled" or "value" relations that are settable per extruder
|
||||
# we need to copy the value to global, so that the front-end displays the right settings.
|
||||
if not self._active_container_stack.getProperty(key, "settable_per_extruder"):
|
||||
relations = self._global_container_stack.getBottom()._getDefinition(key).relations
|
||||
for relation in filter(lambda r: r.role == "enabled" and r.type == RelationType.RequiredByTarget, relations):
|
||||
for relation in filter(lambda r: (r.role == "enabled" or r.role == "value") and r.type == RelationType.RequiredByTarget, relations):
|
||||
# Target setting is settable per extruder
|
||||
if self._active_container_stack.getProperty(relation.target.key, "settable_per_extruder"):
|
||||
new_value = self._global_container_stack.getProperty(key, "value")
|
||||
|
Loading…
x
Reference in New Issue
Block a user