mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Connect compare-and-safe profile dialog buttons to actions.
Some rework was needed as to not get the entire Preferences window to show up, which previously came along with the add profile action. part of CURA-9347
This commit is contained in:
parent
c13deba1ea
commit
8f65af61e5
4 changed files with 38 additions and 23 deletions
|
@ -494,13 +494,7 @@ UM.MainWindow
|
|||
Connections
|
||||
{
|
||||
target: Cura.Actions.addProfile
|
||||
function onTriggered()
|
||||
{
|
||||
preferences.show();
|
||||
preferences.setPage(4);
|
||||
// Create a new profile after a very short delay so the preference page has time to initiate
|
||||
createProfileTimer.start();
|
||||
}
|
||||
function onTriggered() { createNewQualityDialog.visible = true; }
|
||||
}
|
||||
|
||||
Connections
|
||||
|
@ -547,15 +541,6 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
Timer
|
||||
{
|
||||
id: createProfileTimer
|
||||
repeat: false
|
||||
interval: 1
|
||||
|
||||
onTriggered: preferences.getCurrentItem().createProfile()
|
||||
}
|
||||
|
||||
// BlurSettings is a way to force the focus away from any of the setting items.
|
||||
// We need to do this in order to keep the bindings intact.
|
||||
Connections
|
||||
|
@ -887,6 +872,15 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
Cura.RenameDialog
|
||||
{
|
||||
id: createNewQualityDialog
|
||||
title: catalog.i18nc("@title:window", "Save Custom Profile")
|
||||
object: catalog.i18nc("@textfield:placeholder", "<New Custom Profile>")
|
||||
explanation: catalog.i18nc("@info", "Custom profile name:")
|
||||
onAccepted: CuraApplication.getQualityManagementModel().createQualityChanges(newName, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to check whether a QML object has a certain type.
|
||||
* Taken from StackOverflow: https://stackoverflow.com/a/28384228 and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue