mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 08:35:57 +08:00
When reverting a user setting be sure to delete it from all of the stacks, global and extruder.
Contributes to CURA-2232 No resolvement strategy for prime_tower_enable and platform adhesion
This commit is contained in:
parent
f527da2f3c
commit
8086646de1
@ -361,6 +361,18 @@ class MachineManager(QObject):
|
|||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
## Delete a user setting from the global stack and all extruder stacks.
|
||||||
|
# \param key \type{str} the name of the key to delete
|
||||||
|
@pyqtSlot(str)
|
||||||
|
def clearUserSettingAllCurrentStacks(self, key):
|
||||||
|
if not self._global_container_stack:
|
||||||
|
return
|
||||||
|
|
||||||
|
self._global_container_stack.getTop().removeInstance(key)
|
||||||
|
|
||||||
|
for stack in ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId()):
|
||||||
|
stack.getTop().removeInstance(key)
|
||||||
|
|
||||||
## Check if the global profile does not contain error states
|
## Check if the global profile does not contain error states
|
||||||
# Note that the _active_stack_valid is cached due to performance issues
|
# Note that the _active_stack_valid is cached due to performance issues
|
||||||
# Calling _checkStackForErrors on every change is simply too expensive
|
# Calling _checkStackForErrors on every change is simply too expensive
|
||||||
|
@ -179,8 +179,8 @@ Item {
|
|||||||
iconSource: UM.Theme.getIcon("reset")
|
iconSource: UM.Theme.getIcon("reset")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
revertButton.focus = true
|
revertButton.focus = true;
|
||||||
propertyProvider.removeFromContainer(0)
|
Cura.MachineManager.clearUserSettingAllCurrentStacks(propertyProvider.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
onEntered: { hoverTimer.stop(); base.showTooltip(catalog.i18nc("@label", "This setting has a value that is different from the profile.\n\nClick to restore the value of the profile.")) }
|
onEntered: { hoverTimer.stop(); base.showTooltip(catalog.i18nc("@label", "This setting has a value that is different from the profile.\n\nClick to restore the value of the profile.")) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user