summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
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
@@ -419,6 +419,8 @@ void CalendarView::init()
419 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), 419 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ),
420 this, SLOT ( todo_unsub( Todo * ) ) ); 420 this, SLOT ( todo_unsub( Todo * ) ) );
421 421
422 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
423 this, SLOT ( todo_resub( Todo *,Todo * ) ) );
422 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, 424 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList,
423 SLOT( updateTodo( Todo *, int ) ) ); 425 SLOT( updateTodo( Todo *, int ) ) );
424 connect( this, SIGNAL( todoModified( Todo *, int )), this, 426 connect( this, SIGNAL( todoModified( Todo *, int )), this,
@@ -2746,6 +2748,20 @@ void CalendarView::appointment_delete()
2746 deleteEvent(anEvent); 2748 deleteEvent(anEvent);
2747} 2749}
2748 2750
2751void CalendarView::todo_resub( Todo * parent, Todo * sub )
2752{
2753 if (!sub) return;
2754 if (!parent) return;
2755 if ( sub->relatedTo() )
2756 sub->relatedTo()->removeRelation(sub);
2757 sub->setRelatedTo(parent);
2758 sub->setRelatedToUid(parent->uid());
2759 parent->addRelation(sub);
2760 sub->updated();
2761 parent->updated();
2762 setModified(true);
2763 updateView();
2764}
2749void CalendarView::todo_unsub(Todo *anTodo ) 2765void CalendarView::todo_unsub(Todo *anTodo )
2750{ 2766{
2751 // Todo *anTodo = selectedTodo(); 2767 // Todo *anTodo = selectedTodo();