Commit 6919472e authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Fixed incidence editor action stealing enter from other parts of Kalendar

parent 44e966cd
Pipeline #93383 passed with stage
in 4 minutes and 33 seconds
......@@ -56,12 +56,12 @@ Kirigami.ScrollablePage {
QQC2.Action {
id: submitAction
enabled: root.validDates && incidenceWrapper.summary && incidenceWrapper.collectionId
shortcut: "Return"
onTriggered: {
if (editMode && root.validDates && incidenceWrapper.summary && incidenceWrapper.collectionId) {
if (editMode) {
edited(incidenceWrapper);
cancel(); // Easy way to close the editor
} else if (root.validDates && incidenceWrapper.summary && incidenceWrapper.collectionId) {
} else if (root.validDates) {
added(incidenceWrapper);
if(root.incidenceWrapper.incidenceType === IncidenceWrapper.TypeTodo) {
Config.lastUsedTodoCollection = root.incidenceWrapper.collectionId;
......@@ -69,8 +69,8 @@ Kirigami.ScrollablePage {
Config.lastUsedEventCollection = root.incidenceWrapper.collectionId;
}
Config.save();
cancel();
}
cancel(); // Easy way to close the editor
}
}
......
......@@ -50,7 +50,6 @@ TreeListView {
id: allTasksPlaceholderMessage
anchors.centerIn: parent
visible: (!root.filter || !root.filter.collectionId || root.filter.collectionId < 0) && Kalendar.CalendarManager.enabledTodoCollections.length === 0 && parent.count === 0
onVisibleChanged: console.log(root.filter, root.filter.collectionId)
text: i18n("No task calendars enabled.")
}
......
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