mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Fix reset to default quality
This commit is contained in:
parent
5a55c1817d
commit
f14ddb8711
3 changed files with 6 additions and 8 deletions
|
@ -1270,13 +1270,11 @@ class MachineManager(QObject):
|
||||||
self._application.discardOrKeepProfileChanges()
|
self._application.discardOrKeepProfileChanges()
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def clearQualityChangesGroup(self):
|
def resetToUseDefaultQuality(self):
|
||||||
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
||||||
self._setQualityGroup(self._current_quality_group)
|
self._setQualityGroup(self._current_quality_group)
|
||||||
|
for stack in [self._global_container_stack] + list(self._global_container_stack.extruders.values()):
|
||||||
# See if we need to show the Discard or Keep changes screen
|
stack.userChanges.clear()
|
||||||
if self.hasUserSettings and Preferences.getInstance().getValue("cura/active_mode") == 1:
|
|
||||||
self._application.discardOrKeepProfileChanges()
|
|
||||||
|
|
||||||
@pyqtProperty(QObject, fset = setQualityChangesGroup, notify = activeQualityChangesGroupChanged)
|
@pyqtProperty(QObject, fset = setQualityChangesGroup, notify = activeQualityChangesGroupChanged)
|
||||||
def activeQualityChangesGroup(self):
|
def activeQualityChangesGroup(self):
|
||||||
|
|
|
@ -16,7 +16,8 @@ class SimpleModeSettingsManager(QObject):
|
||||||
self._is_profile_user_created = False # True when profile was custom created by user
|
self._is_profile_user_created = False # True when profile was custom created by user
|
||||||
|
|
||||||
self._machine_manager.activeStackValueChanged.connect(self._updateIsProfileCustomized)
|
self._machine_manager.activeStackValueChanged.connect(self._updateIsProfileCustomized)
|
||||||
self._machine_manager.activeQualityChanged.connect(self._updateIsProfileUserCreated)
|
self._machine_manager.activeQualityGroupChanged.connect(self._updateIsProfileUserCreated)
|
||||||
|
self._machine_manager.activeQualityChangesGroupChanged.connect(self._updateIsProfileUserCreated)
|
||||||
|
|
||||||
# update on create as the activeQualityChanged signal is emitted before this manager is created when Cura starts
|
# update on create as the activeQualityChanged signal is emitted before this manager is created when Cura starts
|
||||||
self._updateIsProfileCustomized()
|
self._updateIsProfileCustomized()
|
||||||
|
|
|
@ -111,7 +111,6 @@ Item
|
||||||
|
|
||||||
// Set selected value
|
// Set selected value
|
||||||
if (Cura.MachineManager.activeQualityType == qualityItem.quality_type) {
|
if (Cura.MachineManager.activeQualityType == qualityItem.quality_type) {
|
||||||
|
|
||||||
// set to -1 when switching to user created profile so all ticks are clickable
|
// set to -1 when switching to user created profile so all ticks are clickable
|
||||||
if (Cura.SimpleModeSettingsManager.isProfileUserCreated) {
|
if (Cura.SimpleModeSettingsManager.isProfileUserCreated) {
|
||||||
qualityModel.qualitySliderActiveIndex = -1
|
qualityModel.qualitySliderActiveIndex = -1
|
||||||
|
@ -474,7 +473,7 @@ Item
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
// if the current profile is user-created, switch to a built-in quality
|
// if the current profile is user-created, switch to a built-in quality
|
||||||
Cura.MachineManager.clearQualityChangesGroup()
|
Cura.MachineManager.resetToUseDefaultQuality()
|
||||||
}
|
}
|
||||||
onEntered:
|
onEntered:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue