author | zautrix <zautrix> | 2005-04-10 08:53:14 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-10 08:53:14 (UTC) |
commit | 79b12b680f6a0653bcff84c8ef83b23803246b7d (patch) (side-by-side diff) | |
tree | 05e4c6d7ac0446eacb7dff6ca466f656b3152793 /korganizer | |
parent | 54f5fe5e6f4909109edf915513c02f7af3e7bb2d (diff) | |
download | kdepimpi-79b12b680f6a0653bcff84c8ef83b23803246b7d.zip kdepimpi-79b12b680f6a0653bcff84c8ef83b23803246b7d.tar.gz kdepimpi-79b12b680f6a0653bcff84c8ef83b23803246b7d.tar.bz2 |
fixes
-rw-r--r-- | korganizer/calendarview.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 8512a07..c530037 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -3002,12 +3002,8 @@ void CalendarView::todo_resub( Todo * parent, Todo * sub ) { if (!sub) return; - if (!parent) return; - if ( sub->relatedTo() ) - sub->relatedTo()->removeRelation(sub); + if ( sub->relatedTo() == parent ) + return; sub->setRelatedTo(parent); - sub->setRelatedToUid(parent->uid()); - parent->addRelation(sub); sub->updated(); - parent->updated(); setModified(true); updateView(); @@ -3015,13 +3011,5 @@ void CalendarView::todo_resub( Todo * parent, Todo * sub ) void CalendarView::todo_unsub(Todo *anTodo ) { - // Todo *anTodo = selectedTodo(); - if (!anTodo) return; - if (!anTodo->relatedTo()) return; - anTodo->relatedTo()->removeRelation(anTodo); - anTodo->setRelatedTo(0); - anTodo->updated(); - anTodo->setRelatedToUid(""); - setModified(true); - updateView(); + todo_resub( 0, anTodo ); } |