Make behavior of Create Profile consistent between prefs and menu

CURA-2161
This commit is contained in:
fieldOfView 2016-09-06 15:39:44 +02:00
parent a40476eb62
commit 68ddf90d58
2 changed files with 9 additions and 9 deletions

View file

@ -464,12 +464,11 @@ UM.MainWindow
target: Cura.Actions.addProfile
onTriggered:
{
Cura.ContainerManager.createQualityChanges(null);
preferences.setPage(4);
preferences.show();
// Show the renameDialog after a very short delay so the preference page has time to initiate
showProfileNameDialogTimer.start();
// Create a new profile after a very short delay so the preference page has time to initiate
createProfileTimer.start();
}
}
@ -516,11 +515,11 @@ UM.MainWindow
Timer
{
id: showProfileNameDialogTimer
id: createProfileTimer
repeat: false
interval: 1
onTriggered: preferences.getCurrentItem().showProfileNameDialog()
onTriggered: preferences.getCurrentItem().createProfile()
}
// BlurSettings is a way to force the focus away from any of the setting items.

View file

@ -141,11 +141,12 @@ UM.ManagementPage
scrollviewCaption: catalog.i18nc("@label %1 is printer name","Printer: %1").arg(Cura.MachineManager.activeMachineName)
signal showProfileNameDialog()
onShowProfileNameDialog:
signal createProfile()
onCreateProfile:
{
renameDialog.open();
renameDialog.selectText();
newNameDialog.object = base.currentItem != null ? base.currentItem.name : "";
newNameDialog.open();
newNameDialog.selectText();
}
signal selectContainer(string name)