mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 08:28:59 +08:00
Merge branch 'CURA-11189-reset-intents' of github.com:Ultimaker/Cura into 5.5
This commit is contained in:
commit
7afcf16b94
@ -1700,6 +1700,16 @@ class MachineManager(QObject):
|
|||||||
else: # No intent had the correct category.
|
else: # No intent had the correct category.
|
||||||
extruder.intent = empty_intent_container
|
extruder.intent = empty_intent_container
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def resetIntents(self) -> None:
|
||||||
|
"""Reset the intent category of the current printer.
|
||||||
|
"""
|
||||||
|
global_stack = self._application.getGlobalContainerStack()
|
||||||
|
if global_stack is None:
|
||||||
|
return
|
||||||
|
for extruder in global_stack.extruderList:
|
||||||
|
extruder.intent = empty_intent_container
|
||||||
|
|
||||||
def activeQualityGroup(self) -> Optional["QualityGroup"]:
|
def activeQualityGroup(self) -> Optional["QualityGroup"]:
|
||||||
"""Get the currently activated quality group.
|
"""Get the currently activated quality group.
|
||||||
|
|
||||||
|
@ -1259,7 +1259,9 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||||||
available_intent_category_list = IntentManager.getInstance().currentAvailableIntentCategories()
|
available_intent_category_list = IntentManager.getInstance().currentAvailableIntentCategories()
|
||||||
if self._intent_category_to_apply is not None and self._intent_category_to_apply in available_intent_category_list:
|
if self._intent_category_to_apply is not None and self._intent_category_to_apply in available_intent_category_list:
|
||||||
machine_manager.setIntentByCategory(self._intent_category_to_apply)
|
machine_manager.setIntentByCategory(self._intent_category_to_apply)
|
||||||
|
else:
|
||||||
|
# if no intent is provided, reset to the default (balanced) intent
|
||||||
|
machine_manager.resetIntents()
|
||||||
# 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())
|
||||||
|
|
||||||
|
@ -35,10 +35,12 @@ class WorkspaceDialog(QObject):
|
|||||||
self._qml_url = "WorkspaceDialog.qml"
|
self._qml_url = "WorkspaceDialog.qml"
|
||||||
self._lock = threading.Lock()
|
self._lock = threading.Lock()
|
||||||
self._default_strategy = None
|
self._default_strategy = None
|
||||||
self._result = {"machine": self._default_strategy,
|
self._result = {
|
||||||
"quality_changes": self._default_strategy,
|
"machine": self._default_strategy,
|
||||||
"definition_changes": self._default_strategy,
|
"quality_changes": self._default_strategy,
|
||||||
"material": self._default_strategy}
|
"definition_changes": self._default_strategy,
|
||||||
|
"material": self._default_strategy,
|
||||||
|
}
|
||||||
self._override_machine = None
|
self._override_machine = None
|
||||||
self._visible = False
|
self._visible = False
|
||||||
self.showDialogSignal.connect(self.__show)
|
self.showDialogSignal.connect(self.__show)
|
||||||
@ -347,10 +349,12 @@ class WorkspaceDialog(QObject):
|
|||||||
if threading.current_thread() != threading.main_thread():
|
if threading.current_thread() != threading.main_thread():
|
||||||
self._lock.acquire()
|
self._lock.acquire()
|
||||||
# Reset the result
|
# Reset the result
|
||||||
self._result = {"machine": self._default_strategy,
|
self._result = {
|
||||||
"quality_changes": self._default_strategy,
|
"machine": self._default_strategy,
|
||||||
"definition_changes": self._default_strategy,
|
"quality_changes": self._default_strategy,
|
||||||
"material": self._default_strategy}
|
"definition_changes": self._default_strategy,
|
||||||
|
"material": self._default_strategy,
|
||||||
|
}
|
||||||
self._visible = True
|
self._visible = True
|
||||||
self.showDialogSignal.emit()
|
self.showDialogSignal.emit()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user