Integrate ImagePackDeleteDialog in ImagePackSettingsDialog as delete confirmation

pull/1630/head
FallenValkyrie 1 year ago
parent e3fe1703fa
commit 2aefe78a63
No known key found for this signature in database
GPG Key ID: 9D1AE3C23A00B8BC
  1. 36
      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);
}
}
}

Loading…
Cancel
Save