Commit ab7c65c7 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Cancelling recurring incidence moves now reenables drag

parent 48bbaa33
Pipeline #105228 passed with stage
in 6 minutes and 8 seconds
......@@ -919,6 +919,7 @@ Kirigami.ApplicationWindow {
if(incidenceWrapper.recurrenceData.type === 0) {
CalendarManager.updateIncidenceDates(incidenceWrapper, startOffset, endOffset);
} else {
const onClosingHandler = () => { caughtDelegate.caught = false; root.reenableDragOnCurrentView(); };
const openDialogWindow = pageStack.pushDialogLayer(recurringIncidenceChangeSheetComponent, {
incidenceWrapper: incidenceWrapper,
startOffset: startOffset,
......@@ -928,26 +929,26 @@ Kirigami.ApplicationWindow {
}, {
width: Kirigami.Units.gridUnit * 34,
height: Kirigami.Units.gridUnit * 6,
onClosing: caughtDelegate.caught = false
onClosing: onClosingHandler()
});
if(!Kirigami.Settings.isMobile) {
openDialogWindow.Keys.escapePressed.connect(function() { openDialogWindow.closeDialog() });
}
openDialogWindow.Keys.escapePressed.connect(function() { openDialogWindow.closeDialog() });
}
}
Connections {
target: CalendarManager
function onUpdateIncidenceDatesCompleted() {
pageStack.currentItem.dragDropEnabled = true;
function reenableDragOnCurrentView() {
pageStack.currentItem.dragDropEnabled = true;
if(pageStack.layers.currentItem && pageStack.layers.currentItem.dragDropEnabled) {
pageStack.layers.currentItem.dragDropEnabled = true;
}
if(pageStack.layers.currentItem && pageStack.layers.currentItem.dragDropEnabled) {
pageStack.layers.currentItem.dragDropEnabled = true;
}
}
Connections {
target: CalendarManager
function onUpdateIncidenceDatesCompleted() { root.reenableDragOnCurrentView(); }
}
Component {
id: deleteIncidenceSheetComponent
DeleteIncidenceSheet {
......@@ -1034,6 +1035,7 @@ Kirigami.ApplicationWindow {
}
onCancel: {
caughtDelegate.caught = false;
root.reenableDragOnCurrentView();
closeDialog();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment