mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Show "Create" only when there are user changes, "Duplicate" otherwise
CURA-2220
This commit is contained in:
parent
b09e8bb1c9
commit
ac7c1a92a5
1 changed files with 2 additions and 2 deletions
|
|
@ -71,13 +71,13 @@ UM.ManagementPage
|
||||||
},
|
},
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: base.currentItem && (base.currentItem.id == Cura.MachineManager.activeQualityId) ? catalog.i18nc("@label", "Create") : catalog.i18nc("@label", "Duplicate")
|
text: base.currentItem && (base.currentItem.id == Cura.MachineManager.activeQualityId) && Cura.MachineManager.hasUserSettings ? catalog.i18nc("@label", "Create") : catalog.i18nc("@label", "Duplicate")
|
||||||
iconName: "list-add";
|
iconName: "list-add";
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
var selectedContainer;
|
var selectedContainer;
|
||||||
if (base.currentItem.id == Cura.MachineManager.activeQualityId) {
|
if (base.currentItem.id == Cura.MachineManager.activeQualityId && Cura.MachineManager.hasUserSettings) {
|
||||||
selectedContainer = Cura.ContainerManager.createQualityChanges();
|
selectedContainer = Cura.ContainerManager.createQualityChanges();
|
||||||
} else {
|
} else {
|
||||||
selectedContainer = Cura.ContainerManager.duplicateQualityOrQualityChanges(base.currentItem.name);
|
selectedContainer = Cura.ContainerManager.duplicateQualityOrQualityChanges(base.currentItem.name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue