From 79b12b680f6a0653bcff84c8ef83b23803246b7d Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 10 Apr 2005 08:53:14 +0000 Subject: fixes --- (limited to 'korganizer/calendarview.cpp') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 8512a07..c530037 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -3001,28 +3001,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); + if ( sub->relatedTo() == parent ) + return; sub->setRelatedTo(parent); - sub->setRelatedToUid(parent->uid()); - parent->addRelation(sub); sub->updated(); - parent->updated(); setModified(true); updateView(); } 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 ); } void CalendarView::deleteTodo(Todo *todo) -- cgit v0.9.0.2