summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index a8143a0..a12acd1 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -505,13 +505,13 @@ void KOTodoView::setNarrow()
505 mTodoListView->setColumnWidth( 4, 40 ); 505 mTodoListView->setColumnWidth( 4, 40 );
506 mTodoListView->setColumnWidth( 5, 90 ); 506 mTodoListView->setColumnWidth( 5, 90 );
507 507
508} 508}
509void KOTodoView::updateView() 509void KOTodoView::updateView()
510{ 510{
511 511 pendingSubtodo = 0;
512 if ( mBlockUpdate ) { 512 if ( mBlockUpdate ) {
513 //qDebug("blocked "); 513 //qDebug("blocked ");
514 return; 514 return;
515 } 515 }
516 //qDebug("update "); 516 //qDebug("update ");
517// kdDebug() << "KOTodoView::updateView()" << endl; 517// kdDebug() << "KOTodoView::updateView()" << endl;
@@ -599,12 +599,13 @@ void KOTodoView::updateView()
599 mTodoListView->setFocus(); 599 mTodoListView->setFocus();
600 processSelectionChange(); 600 processSelectionChange();
601} 601}
602 602
603void KOTodoView::restoreItemState( QListViewItem *item ) 603void KOTodoView::restoreItemState( QListViewItem *item )
604{ 604{
605 pendingSubtodo = 0;
605 while( item ) { 606 while( item ) {
606 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 607 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
607 todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); 608 todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) );
608 if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); 609 if( item->childCount() > 0 ) restoreItemState( item->firstChild() );
609 item = item->nextSibling(); 610 item = item->nextSibling();
610 } 611 }
@@ -614,13 +615,13 @@ void KOTodoView::restoreItemState( QListViewItem *item )
614QMap<Todo *,KOTodoViewItem *>::ConstIterator 615QMap<Todo *,KOTodoViewItem *>::ConstIterator
615 KOTodoView::insertTodoItem(Todo *todo) 616 KOTodoView::insertTodoItem(Todo *todo)
616{ 617{
617// kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; 618// kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl;
618 // TODO: Check, if dynmaic cast is necessary 619 // TODO: Check, if dynmaic cast is necessary
619 620
620 621 pendingSubtodo = 0;
621 Incidence *incidence = todo->relatedTo(); 622 Incidence *incidence = todo->relatedTo();
622 if (incidence && incidence->type() == "Todo") { 623 if (incidence && incidence->type() == "Todo") {
623 Todo *relatedTodo = static_cast<Todo *>(incidence); 624 Todo *relatedTodo = static_cast<Todo *>(incidence);
624 625
625// kdDebug() << " has Related" << endl; 626// kdDebug() << " has Related" << endl;
626 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; 627 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
@@ -702,12 +703,13 @@ void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
702{ 703{
703 emit showTodoSignal(((KOTodoViewItem *)item)->todo()); 704 emit showTodoSignal(((KOTodoViewItem *)item)->todo());
704} 705}
705 706
706void KOTodoView::popupMenu(QListViewItem *item,const QPoint &,int column) 707void KOTodoView::popupMenu(QListViewItem *item,const QPoint &,int column)
707{ 708{
709 pendingSubtodo = 0;
708 mActiveItem = (KOTodoViewItem *)item; 710 mActiveItem = (KOTodoViewItem *)item;
709 if (item) { 711 if (item) {
710 switch (column){ 712 switch (column){
711 case 1: 713 case 1:
712 mPriorityPopupMenu->popup(QCursor::pos ()); break; 714 mPriorityPopupMenu->popup(QCursor::pos ()); break;
713 case 2: 715 case 2: