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 target: Cura.Actions.addProfile
onTriggered: onTriggered:
{ {
Cura.ContainerManager.createQualityChanges(null);
preferences.setPage(4); preferences.setPage(4);
preferences.show(); preferences.show();
// Show the renameDialog after a very short delay so the preference page has time to initiate // Create a new profile after a very short delay so the preference page has time to initiate
showProfileNameDialogTimer.start(); createProfileTimer.start();
} }
} }
@ -516,11 +515,11 @@ UM.MainWindow
Timer Timer
{ {
id: showProfileNameDialogTimer id: createProfileTimer
repeat: false repeat: false
interval: 1 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. // 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) scrollviewCaption: catalog.i18nc("@label %1 is printer name","Printer: %1").arg(Cura.MachineManager.activeMachineName)
signal showProfileNameDialog() signal createProfile()
onShowProfileNameDialog: onCreateProfile:
{ {
renameDialog.open(); newNameDialog.object = base.currentItem != null ? base.currentItem.name : "";
renameDialog.selectText(); newNameDialog.open();
newNameDialog.selectText();
} }
signal selectContainer(string name) signal selectContainer(string name)