summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
authorzautrix <zautrix>2004-10-16 13:36:11 (UTC)
committer zautrix <zautrix>2004-10-16 13:36:11 (UTC)
commitc3325ebbb92a2814fcb622caaf71316cfa0c2908 (patch) (side-by-side diff)
treeb53545c39f84fc6ce694f371509b4a9fe2ddd743 /korganizer/calendarview.cpp
parent023b3c542a6dd4d1c4b53dba6bb2c68f605a7917 (diff)
downloadkdepimpi-c3325ebbb92a2814fcb622caaf71316cfa0c2908.zip
kdepimpi-c3325ebbb92a2814fcb622caaf71316cfa0c2908.tar.gz
kdepimpi-c3325ebbb92a2814fcb622caaf71316cfa0c2908.tar.bz2
made todos reparentable
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 )