mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 06:23:59 -06:00
CURA-4606 reimplemented duplicate profile
This commit is contained in:
parent
7a78f9821f
commit
bd10f23311
3 changed files with 46 additions and 92 deletions
|
@ -103,7 +103,9 @@ Item
|
|||
visible: !base.canCreateProfile
|
||||
|
||||
onClicked: {
|
||||
// TODO
|
||||
newDuplicateNameDialog.object = Cura.ContainerManager.makeUniqueName(base.currentItem.name);
|
||||
newDuplicateNameDialog.open();
|
||||
newDuplicateNameDialog.selectText();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,8 +156,7 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Dialog to request a name when creating a new profile
|
||||
// Dialog to request a name when creating a new profile
|
||||
UM.RenameDialog
|
||||
{
|
||||
title: catalog.i18nc("@title:window", "Create Profile")
|
||||
|
@ -168,6 +169,19 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
// Dialog to request a name when duplicating a new profile
|
||||
UM.RenameDialog
|
||||
{
|
||||
title: catalog.i18nc("@title:window", "Duplicate Profile")
|
||||
id: newDuplicateNameDialog;
|
||||
object: "<new name>";
|
||||
onAccepted:
|
||||
{
|
||||
Cura.ContainerManager.duplicateQualityChanges(newName, base.currentItem);
|
||||
objectList.currentIndex = -1 //Reset selection.
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: contentsItem
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue