mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 07:15:03 -06:00
Merge pull request #13938 from Ultimaker/CURA-9347_safe_to_profile_button
[CURA-9347] Easier 'compare-and-safe' for (new or custom) profiles
This commit is contained in:
commit
b8b433ed5c
10 changed files with 209 additions and 87 deletions
|
@ -709,6 +709,7 @@ class CuraApplication(QtApplication):
|
|||
self.showMessageBox.emit(title, text, informativeText, detailedText, buttons, icon)
|
||||
|
||||
showDiscardOrKeepProfileChanges = pyqtSignal()
|
||||
showCompareAndSaveProfileChanges = pyqtSignal(int)
|
||||
|
||||
def discardOrKeepProfileChanges(self) -> bool:
|
||||
has_user_interaction = False
|
||||
|
|
|
@ -184,7 +184,8 @@ class QualityManagementModel(ListModel):
|
|||
container_registry.addContainer(container.duplicate(new_id, new_name))
|
||||
|
||||
@pyqtSlot(str)
|
||||
def createQualityChanges(self, base_name: str) -> None:
|
||||
@pyqtSlot(str, bool)
|
||||
def createQualityChanges(self, base_name: str, activate_after_success: bool = False) -> None:
|
||||
"""Create quality changes containers from the user containers in the active stacks.
|
||||
|
||||
This will go through the global and extruder stacks and create quality_changes containers from the user
|
||||
|
@ -233,6 +234,14 @@ class QualityManagementModel(ListModel):
|
|||
|
||||
container_registry.addContainer(new_changes)
|
||||
|
||||
if activate_after_success:
|
||||
# At this point, the QualityChangesGroup object for the new changes may not exist yet.
|
||||
# This can be forced by asking for all of them. At that point it's just as well to loop.
|
||||
for quality_changes in ContainerTree.getInstance().getCurrentQualityChangesGroups():
|
||||
if quality_changes.name == unique_name:
|
||||
machine_manager.setQualityChangesGroup(quality_changes)
|
||||
break
|
||||
|
||||
def _createQualityChanges(self, quality_type: str, intent_category: Optional[str], new_name: str, machine: "GlobalStack", extruder_stack: Optional["ExtruderStack"]) -> "InstanceContainer":
|
||||
"""Create a quality changes container with the given set-up.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue