author | zautrix <zautrix> | 2005-04-10 08:53:14 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-10 08:53:14 (UTC) |
commit | 79b12b680f6a0653bcff84c8ef83b23803246b7d (patch) (unidiff) | |
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 ) | |||
3002 | { | 3002 | { |
3003 | if (!sub) return; | 3003 | if (!sub) return; |
3004 | if (!parent) return; | 3004 | if ( sub->relatedTo() == parent ) |
3005 | if ( sub->relatedTo() ) | 3005 | return; |
3006 | sub->relatedTo()->removeRelation(sub); | ||
3007 | sub->setRelatedTo(parent); | 3006 | sub->setRelatedTo(parent); |
3008 | sub->setRelatedToUid(parent->uid()); | ||
3009 | parent->addRelation(sub); | ||
3010 | sub->updated(); | 3007 | sub->updated(); |
3011 | parent->updated(); | ||
3012 | setModified(true); | 3008 | setModified(true); |
3013 | updateView(); | 3009 | updateView(); |
@@ -3015,13 +3011,5 @@ void CalendarView::todo_resub( Todo * parent, Todo * sub ) | |||
3015 | void CalendarView::todo_unsub(Todo *anTodo ) | 3011 | void CalendarView::todo_unsub(Todo *anTodo ) |
3016 | { | 3012 | { |
3017 | // Todo *anTodo = selectedTodo(); | 3013 | todo_resub( 0, anTodo ); |
3018 | if (!anTodo) return; | ||
3019 | if (!anTodo->relatedTo()) return; | ||
3020 | anTodo->relatedTo()->removeRelation(anTodo); | ||
3021 | anTodo->setRelatedTo(0); | ||
3022 | anTodo->updated(); | ||
3023 | anTodo->setRelatedToUid(""); | ||
3024 | setModified(true); | ||
3025 | updateView(); | ||
3026 | } | 3014 | } |
3027 | 3015 | ||