summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp18
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 )
3015void CalendarView::todo_unsub(Todo *anTodo ) 3011void 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