From 2aefe78a63ef7cbb03f46e20273564c2c74f9464 Mon Sep 17 00:00:00 2001 From: FallenValkyrie Date: Thu, 7 Dec 2023 01:00:06 +0100 Subject: [PATCH] Integrate ImagePackDeleteDialog in ImagePackSettingsDialog as delete confirmation --- .../qml/dialogs/ImagePackSettingsDialog.qml | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/resources/qml/dialogs/ImagePackSettingsDialog.qml b/resources/qml/dialogs/ImagePackSettingsDialog.qml index 9f807e65..12b4fd37 100644 --- a/resources/qml/dialogs/ImagePackSettingsDialog.qml +++ b/resources/qml/dialogs/ImagePackSettingsDialog.qml @@ -32,7 +32,11 @@ ApplicationWindow { ImagePackEditorDialog { } + } + Component { + id: packDeleteDialog + ImagePackDeleteDialog {} } AdaptiveLayout { @@ -189,16 +193,30 @@ ApplicationWindow { } - Button { + RowLayout { Layout.alignment: Qt.AlignHCenter - text: qsTr("Edit") - enabled: currentPack.canEdit - onClicked: { - var dialog = packEditor.createObject(timelineRoot, { - "imagePack": currentPack - }); - dialog.show(); - timelineRoot.destroyOnClose(dialog); + + Button { + text: qsTr("Edit") + enabled: currentPack.canEdit + onClicked: { + var dialog = packEditor.createObject(timelineRoot, { + "imagePack": currentPack + }); + dialog.show(); + timelineRoot.destroyOnClose(dialog); + } + } + Button { + text: qsTr("Remove") + enabled: currentPack.canEdit + onClicked: { + var dialog = packDeleteDialog.createObject(timelineRoot, { + "imagePack": currentPack + }); + dialog.open(); + timelineRoot.destroyOnClose(packDeleteDialog); + } } }