mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-19 09:10:47 +08:00
Remove "Rename" button from Materials page and make the other ones work
Since the name is generated from the metadata Contributes to CURA-341
This commit is contained in:
parent
827c7b84fd
commit
aba60b0105
@ -65,22 +65,15 @@ UM.ManagementPage
|
|||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:button", "Duplicate");
|
text: catalog.i18nc("@action:button", "Duplicate");
|
||||||
iconName: "list-add";
|
iconName: "list-add";
|
||||||
enabled: base.currentItem
|
enabled: base.currentItem != null
|
||||||
onClicked: Cura.ContainerManager.duplicateContainer(base.currentItem.id)
|
onClicked: Cura.ContainerManager.duplicateContainer(base.currentItem.id)
|
||||||
},
|
},
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:button", "Remove");
|
text: catalog.i18nc("@action:button", "Remove");
|
||||||
iconName: "list-remove";
|
iconName: "list-remove";
|
||||||
enabled: base.currentItem && !base.currentItem.readOnly
|
enabled: base.currentItem != null && !base.currentItem.readOnly
|
||||||
// onClicked: Cura.ContainerManager.removeContainer()
|
onClicked: confirmDialog.open()
|
||||||
},
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
text: catalog.i18nc("@action:button", "Rename");
|
|
||||||
iconName: "edit-rename";
|
|
||||||
enabled: base.currentItem && !base.currentItem.readOnly
|
|
||||||
// onClicked: Cura.ContainerManager.renameContainer()
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -149,6 +142,13 @@ UM.ManagementPage
|
|||||||
property string description: "";
|
property string description: "";
|
||||||
property string adhesion_info: "";
|
property string adhesion_info: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UM.ConfirmRemoveDialog
|
||||||
|
{
|
||||||
|
id: confirmDialog
|
||||||
|
object: base.currentItem != null ? base.currentItem.name : ""
|
||||||
|
onYes: Cura.ContainerManager.removeContainer(base.currentItem.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onCurrentItemChanged:
|
onCurrentItemChanged:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user