-rw-r--r-- | korganizer/kotodoview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index c23a8ee..06d40b1 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -1451,98 +1451,100 @@ void KOTodoView::clearSelection() void KOTodoView::setAllOpen() { if ( isFlatDisplay ) { isFlatDisplay = false; mPopupMenu->setItemChecked( 8,false ); updateView(); } else { storeCurrentItem(); } setOpen(mTodoListView->firstChild(), true); resetCurrentItem(); } void KOTodoView::setAllClose() { if ( isFlatDisplay ) { isFlatDisplay = false; mPopupMenu->setItemChecked( 8,false ); updateView(); } else { storeCurrentItem(); } setOpen(mTodoListView->firstChild(), false); resetCurrentItem(); } void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) { while ( item ) { setOpen( item->firstChild(), setOpenI ); item->setOpen( setOpenI ); item = item->nextSibling(); } } void KOTodoView::displayAllFlat() { storeCurrentItem(); pendingSubtodo = 0; if ( mBlockUpdate ) { return; } mPopupMenu->setItemChecked( 8,true ); isFlatDisplay = true; QPtrList<Todo> todoList = calendar()->todos(); mTodoMap.clear(); mTodoListView->clear(); Todo *todo; for(todo = todoList.first(); todo; todo = todoList.next()) { - KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); - mTodoMap.insert(todo,todoItem); + if ( checkTodo( todo ) ) { + KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); + mTodoMap.insert(todo,todoItem); + } } resetCurrentItem(); } void KOTodoView::setAllFlat() { if ( isFlatDisplay ) { isFlatDisplay = false; mPopupMenu->setItemChecked( 8,false ); updateView(); return; } displayAllFlat(); } void KOTodoView::purgeCompleted() { emit purgeCompletedSignal(); } void KOTodoView::toggleQuickTodo() { if ( mQuickBar->isVisible() ) { mQuickBar->hide(); KOPrefs::instance()->mEnableQuickTodo = false; } else { mQuickBar->show(); KOPrefs::instance()->mEnableQuickTodo = true; } mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); } void KOTodoView::toggleRunning() { KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); updateView(); if ( KOPrefs::instance()->mHideNonStartedTodos ) topLevelWidget()->setCaption(i18n("Hide not Running")); else topLevelWidget()->setCaption(i18n("Show not Running")); } void KOTodoView::toggleCompleted() { |