From aba60b0105b1e5a74f647d2280c3766ec2e724a8 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 5 Jul 2016 16:48:43 +0200 Subject: [PATCH] Remove "Rename" button from Materials page and make the other ones work Since the name is generated from the metadata Contributes to CURA-341 --- resources/qml/Preferences/MaterialsPage.qml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml index 797b698cd1..a40d4c1e3b 100644 --- a/resources/qml/Preferences/MaterialsPage.qml +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -65,22 +65,15 @@ UM.ManagementPage { text: catalog.i18nc("@action:button", "Duplicate"); iconName: "list-add"; - enabled: base.currentItem + enabled: base.currentItem != null onClicked: Cura.ContainerManager.duplicateContainer(base.currentItem.id) }, Button { text: catalog.i18nc("@action:button", "Remove"); iconName: "list-remove"; - enabled: base.currentItem && !base.currentItem.readOnly -// onClicked: Cura.ContainerManager.removeContainer() - }, - Button - { - text: catalog.i18nc("@action:button", "Rename"); - iconName: "edit-rename"; - enabled: base.currentItem && !base.currentItem.readOnly -// onClicked: Cura.ContainerManager.renameContainer() + enabled: base.currentItem != null && !base.currentItem.readOnly + onClicked: confirmDialog.open() } ] @@ -149,6 +142,13 @@ UM.ManagementPage property string description: ""; property string adhesion_info: ""; } + + UM.ConfirmRemoveDialog + { + id: confirmDialog + object: base.currentItem != null ? base.currentItem.name : "" + onYes: Cura.ContainerManager.removeContainer(base.currentItem.id) + } } onCurrentItemChanged: