Commit 8d458514 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Schedule view now stays in place when things change. Fixes #97

parent 1fd2b110
Pipeline #100606 passed with stage
in 5 minutes and 18 seconds
......@@ -22,6 +22,13 @@ Kirigami.Page {
signal addSubTodo(var parentWrapper)
signal deselect()
onAddIncidence: pathView.currentItem.item.savedYScrollPos = pathView.currentItem.item.QQC2.ScrollBar.vertical.visualPosition
onViewIncidence: pathView.currentItem.item.savedYScrollPos = pathView.currentItem.item.QQC2.ScrollBar.vertical.visualPosition
onEditIncidence: pathView.currentItem.item.savedYScrollPos = pathView.currentItem.item.QQC2.ScrollBar.vertical.visualPosition
onDeleteIncidence: pathView.currentItem.item.savedYScrollPos = pathView.currentItem.item.QQC2.ScrollBar.vertical.visualPosition
onCompleteTodo: pathView.currentItem.item.savedYScrollPos = pathView.currentItem.item.QQC2.ScrollBar.vertical.visualPosition
onAddSubTodo: pathView.currentItem.item.savedYScrollPos = pathView.currentItem.item.QQC2.ScrollBar.vertical.visualPosition
property var openOccurrence
property var model
property date selectedDate: new Date()
......
......@@ -917,7 +917,7 @@ Kirigami.ApplicationWindow {
}
onDeleteIncidence: {
// Deleting an incidence also means deleting all of its occurrences
if(incidenceInfo.incidenceWrapper.incidenceId == deleteIncidenceSheet.incidenceWrapper.incidenceId) {
if(incidenceInfo.incidenceWrapper && incidenceInfo.incidenceWrapper.incidenceId == deleteIncidenceSheet.incidenceWrapper.incidenceId) {
incidenceInfo.incidenceData = undefined;
root.openOccurrence = undefined;
......
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