mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 05:39:37 +08:00
No keep/discard setting dialog in project loading
CURA-4966
This commit is contained in:
parent
b8d3cbfe16
commit
ef8cd304dc
@ -1012,13 +1012,13 @@ class MachineManager(QObject):
|
|||||||
self._updateQualityWithMaterial()
|
self._updateQualityWithMaterial()
|
||||||
|
|
||||||
@pyqtSlot(QObject)
|
@pyqtSlot(QObject)
|
||||||
def setQualityGroup(self, quality_group):
|
def setQualityGroup(self, quality_group, no_dialog = False):
|
||||||
self.blurSettings.emit()
|
self.blurSettings.emit()
|
||||||
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
||||||
self._setQualityGroup(quality_group)
|
self._setQualityGroup(quality_group)
|
||||||
|
|
||||||
# See if we need to show the Discard or Keep changes screen
|
# See if we need to show the Discard or Keep changes screen
|
||||||
if self.hasUserSettings and Preferences.getInstance().getValue("cura/active_mode") == 1:
|
if not no_dialog and self.hasUserSettings and Preferences.getInstance().getValue("cura/active_mode") == 1:
|
||||||
self._application.discardOrKeepProfileChanges()
|
self._application.discardOrKeepProfileChanges()
|
||||||
|
|
||||||
@pyqtProperty(QObject, fset = setQualityGroup, notify = activeQualityGroupChanged)
|
@pyqtProperty(QObject, fset = setQualityGroup, notify = activeQualityGroupChanged)
|
||||||
@ -1026,13 +1026,13 @@ class MachineManager(QObject):
|
|||||||
return self._current_quality_group
|
return self._current_quality_group
|
||||||
|
|
||||||
@pyqtSlot(QObject)
|
@pyqtSlot(QObject)
|
||||||
def setQualityChangesGroup(self, quality_changes_group):
|
def setQualityChangesGroup(self, quality_changes_group, no_dialog = False):
|
||||||
self.blurSettings.emit()
|
self.blurSettings.emit()
|
||||||
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
||||||
self._setQualityChangesGroup(quality_changes_group)
|
self._setQualityChangesGroup(quality_changes_group)
|
||||||
|
|
||||||
# See if we need to show the Discard or Keep changes screen
|
# See if we need to show the Discard or Keep changes screen
|
||||||
if self.hasUserSettings and Preferences.getInstance().getValue("cura/active_mode") == 1:
|
if not no_dialog and self.hasUserSettings and Preferences.getInstance().getValue("cura/active_mode") == 1:
|
||||||
self._application.discardOrKeepProfileChanges()
|
self._application.discardOrKeepProfileChanges()
|
||||||
|
|
||||||
@pyqtProperty(QObject, fset = setQualityChangesGroup, notify = activeQualityChangesGroupChanged)
|
@pyqtProperty(QObject, fset = setQualityChangesGroup, notify = activeQualityChangesGroupChanged)
|
||||||
|
@ -980,7 +980,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||||||
Logger.log("e", "Could not find quality_changes [%s]", self._quality_changes_to_apply)
|
Logger.log("e", "Could not find quality_changes [%s]", self._quality_changes_to_apply)
|
||||||
return
|
return
|
||||||
quality_changes_group = quality_changes_group_dict[self._quality_changes_to_apply]
|
quality_changes_group = quality_changes_group_dict[self._quality_changes_to_apply]
|
||||||
machine_manager.setQualityChangesGroup(quality_changes_group)
|
machine_manager.setQualityChangesGroup(quality_changes_group, no_dialog = True)
|
||||||
else:
|
else:
|
||||||
self._quality_type_to_apply = self._quality_type_to_apply.lower()
|
self._quality_type_to_apply = self._quality_type_to_apply.lower()
|
||||||
quality_group_dict = quality_manager.getQualityGroups(global_stack)
|
quality_group_dict = quality_manager.getQualityGroups(global_stack)
|
||||||
@ -995,7 +995,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||||||
Logger.log("e", "Could not get preferred quality type [%s]", preferred_quality_type)
|
Logger.log("e", "Could not get preferred quality type [%s]", preferred_quality_type)
|
||||||
|
|
||||||
if quality_group is not None:
|
if quality_group is not None:
|
||||||
machine_manager.setQualityGroup(quality_group)
|
machine_manager.setQualityGroup(quality_group, no_dialog = True)
|
||||||
|
|
||||||
# Notify everything/one that is to notify about changes.
|
# Notify everything/one that is to notify about changes.
|
||||||
global_stack.containersChanged.emit(global_stack.getTop())
|
global_stack.containersChanged.emit(global_stack.getTop())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user