-rw-r--r-- | korganizer/kotodoview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 2602487..35c2a9f 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -701,13 +701,13 @@ void KOTodoView::updateView() | |||
701 | bool next = true; | 701 | bool next = true; |
702 | // qDebug("todo %s ", todo->summary().latin1()); | 702 | // qDebug("todo %s ", todo->summary().latin1()); |
703 | Incidence *incidence = todo->relatedTo(); | 703 | Incidence *incidence = todo->relatedTo(); |
704 | while ( incidence ) { | 704 | while ( incidence ) { |
705 | if ( incidence->typeID() == todoID ) { | 705 | if ( incidence->typeID() == todoID ) { |
706 | //qDebug("related %s ",incidence->summary().latin1() ); | 706 | //qDebug("related %s ",incidence->summary().latin1() ); |
707 | if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { | 707 | if ( !(todoList.contains ( ((Todo* )incidence ) ) ) && incidence->calEnabled() ) { |
708 | //qDebug("related not found "); | 708 | //qDebug("related not found "); |
709 | todoList.remove( ); | 709 | todoList.remove( ); |
710 | todo = todoList.current(); | 710 | todo = todoList.current(); |
711 | next = false; | 711 | next = false; |
712 | incidence = 0; | 712 | incidence = 0; |
713 | 713 | ||
@@ -841,12 +841,14 @@ QMap<Todo *,KOTodoViewItem *>::ConstIterator | |||
841 | 841 | ||
842 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; | 842 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; |
843 | // TODO: Check, if dynmaic cast is necessary | 843 | // TODO: Check, if dynmaic cast is necessary |
844 | 844 | ||
845 | pendingSubtodo = 0; | 845 | pendingSubtodo = 0; |
846 | Incidence *incidence = todo->relatedTo(); | 846 | Incidence *incidence = todo->relatedTo(); |
847 | while ( incidence && !incidence->calEnabled() ) | ||
848 | incidence = incidence->relatedTo(); | ||
847 | if (incidence && incidence->typeID() == todoID ) { | 849 | if (incidence && incidence->typeID() == todoID ) { |
848 | Todo *relatedTodo = static_cast<Todo *>(incidence); | 850 | Todo *relatedTodo = static_cast<Todo *>(incidence); |
849 | 851 | ||
850 | // kdDebug() << " has Related" << endl; | 852 | // kdDebug() << " has Related" << endl; |
851 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 853 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
852 | itemIterator = mTodoMap.find(relatedTodo); | 854 | itemIterator = mTodoMap.find(relatedTodo); |