summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index e4a11f5..1f8ad5b 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -421,2 +421,4 @@ void CalendarView::init()
+ connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
+ this, SLOT ( todo_resub( Todo *,Todo * ) ) );
connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList,
@@ -2748,2 +2750,16 @@ void CalendarView::appointment_delete()
+void CalendarView::todo_resub( Todo * parent, Todo * sub )
+{
+ if (!sub) return;
+ if (!parent) return;
+ if ( sub->relatedTo() )
+ sub->relatedTo()->removeRelation(sub);
+ sub->setRelatedTo(parent);
+ sub->setRelatedToUid(parent->uid());
+ parent->addRelation(sub);
+ sub->updated();
+ parent->updated();
+ setModified(true);
+ updateView();
+}
void CalendarView::todo_unsub(Todo *anTodo )