kcms/rules: Handle Escape key to exit Export mode

This avoids unexpectedly exiting the whole KCM when just trying
to cancel the Export mode (based on a true story)
This commit is contained in:
Ismael Asensio 2024-02-21 21:51:51 +01:00
parent 200e46bec6
commit b1ed2bb3e7

View file

@ -121,6 +121,14 @@ KCM.ScrollViewKCM {
]
}
Keys.onEscapePressed: event => {
if (exportInfo.visible) {
exportInfo.visible = false;
return;
}
event.accepted = false;
}
component RuleBookDelegate : Item {
// External item required to make Kirigami.ListItemDragHandle work
width: ruleBookView.width