|
@@ -877,19 +877,21 @@ class MachineManager(QObject):
|
|
|
|
|
|
user_changes_container = self._global_container_stack.userChanges
|
|
|
quality_changes_container = self._global_container_stack.qualityChanges
|
|
|
- print_sequence_in_quality_changes = quality_changes_container.getProperty(setting_key, "value")
|
|
|
- print_sequence_in_user_changes = user_changes_container.getProperty(setting_key, "value")
|
|
|
+ print_sequence_quality_changes = quality_changes_container.getProperty(setting_key, "value")
|
|
|
+ print_sequence_user_changes = user_changes_container.getProperty(setting_key, "value")
|
|
|
|
|
|
- # If the quality changes has the wrong value, then set the correct value in the user changes
|
|
|
- if print_sequence_in_quality_changes and print_sequence_in_quality_changes != new_value:
|
|
|
- user_changes_container.setProperty(setting_key, "value", new_value)
|
|
|
- Logger.log("d", "Setting '{}' in '{}' to '{}' because there are more than 1 enabled extruders.".format(setting_key, user_changes_container, new_value))
|
|
|
- # If the quality changes has no value or the correct value and the user changes container has the wrong value,
|
|
|
- # then reset the setting in the user changes (so that the circular revert-changes arrow will now show up in the
|
|
|
- # interface)
|
|
|
- elif print_sequence_in_user_changes and print_sequence_in_user_changes != new_value:
|
|
|
+ # If the user changes container has a value and its the incorrect value, then reset the setting in the user
|
|
|
+ # changes (so that the circular revert-changes arrow will now show up in the interface)
|
|
|
+ if print_sequence_user_changes and print_sequence_user_changes != new_value:
|
|
|
user_changes_container.removeInstance(setting_key)
|
|
|
Logger.log("d", "Resetting '{}' in container '{}' because there are more than 1 enabled extruders.".format(setting_key, user_changes_container))
|
|
|
+ # If the print sequence doesn't exist in either the user changes or the quality changes (yet it still has the
|
|
|
+ # wrong value in the global stack), or it exists in the quality changes and it has the wrong value, then set it
|
|
|
+ # in the user changes
|
|
|
+ elif (not print_sequence_quality_changes and not print_sequence_user_changes) \
|
|
|
+ or (print_sequence_quality_changes and print_sequence_quality_changes != new_value):
|
|
|
+ user_changes_container.setProperty(setting_key, "value", new_value)
|
|
|
+ Logger.log("d", "Setting '{}' in '{}' to '{}' because there are more than 1 enabled extruders.".format(setting_key, user_changes_container, new_value))
|
|
|
|
|
|
def setActiveMachineExtruderCount(self, extruder_count: int) -> None:
|
|
|
"""Set the amount of extruders on the active machine (global stack)
|