summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 7c8316f..3dac20b 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2265,2 +2265,5 @@ void CalendarView::slotSelectPickerDate( QDate d)
QTime tim;
+ int len = 0;
+ if ( to->hasStartDate() && to->hasDueDate() )
+ len = to->dtStart().secsTo( to->dtDue());
if ( to->hasDueDate() )
@@ -2274,2 +2277,11 @@ void CalendarView::slotSelectPickerDate( QDate d)
to->setDtDue( dt );
+
+ if ( to->hasStartDate() ) {
+ if ( len>0 )
+ to->setDtStart(to->dtDue().addSecs( -len ));
+ else
+ if (to->dtStart() > to->dtDue() )
+ to->setDtStart(to->dtDue().addDays( -3 ));
+ }
+
todoChanged( to );
@@ -3812,3 +3824,3 @@ bool CalendarView::removeCompletedSubTodos( Todo* t )
if ( deleteTodo ) {
- if ( t->isCompleted() ) {
+ if ( t->isCompleted() && !t->doesRecur()) {
checkExternalId( t );