Integrate ImagePackDeleteDialog in ImagePackSettingsDialog as delete confirmation

This commit is contained in:
FallenValkyrie 2023-12-07 01:00:06 +01:00
parent e3fe1703fa
commit 2aefe78a63
No known key found for this signature in database
GPG key ID: 9D1AE3C23A00B8BC

View file

@ -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);
}
}
}