author | zautrix <zautrix> | 2005-08-05 21:59:14 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-05 21:59:14 (UTC) |
commit | cd215c243d0636cabbc73006652b9b6783319de1 (patch) (unidiff) | |
tree | 2b5021ac24ea77304991ebabac97cab9c8451202 | |
parent | 90585d5946407bdb8783bcb369ef7483c869995d (diff) | |
download | kdepimpi-cd215c243d0636cabbc73006652b9b6783319de1.zip kdepimpi-cd215c243d0636cabbc73006652b9b6783319de1.tar.gz kdepimpi-cd215c243d0636cabbc73006652b9b6783319de1.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/kotodoview.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 82c0f4c..00c2d97 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -405,25 +405,25 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | |||
405 | if ( !isVisible() ) { | 405 | if ( !isVisible() ) { |
406 | e->ignore(); | 406 | e->ignore(); |
407 | return; | 407 | return; |
408 | } | 408 | } |
409 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { | 409 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { |
410 | e->ignore(); | 410 | e->ignore(); |
411 | // qDebug(" ignore %d",e->isAutoRepeat() ); | 411 | // qDebug(" ignore %d",e->isAutoRepeat() ); |
412 | return; | 412 | return; |
413 | } | 413 | } |
414 | if (! e->isAutoRepeat() ) | 414 | if (! e->isAutoRepeat() ) |
415 | mFlagKeyPressed = true; | 415 | mFlagKeyPressed = true; |
416 | QListViewItem* cn; | 416 | QListViewItem* cn; |
417 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { | 417 | if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") { |
418 | cn = currentItem(); | 418 | cn = currentItem(); |
419 | if ( cn ) { | 419 | if ( cn ) { |
420 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 420 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
421 | if ( ci ){ | 421 | if ( ci ){ |
422 | if ( e->state() == ShiftButton ) | 422 | if ( e->state() == ShiftButton ) |
423 | ci->setOn( false ); | 423 | ci->setOn( false ); |
424 | else | 424 | else |
425 | ci->setOn( true ); | 425 | ci->setOn( true ); |
426 | cn = cn->itemBelow(); | 426 | cn = cn->itemBelow(); |
427 | if ( cn ) { | 427 | if ( cn ) { |
428 | setCurrentItem ( cn ); | 428 | setCurrentItem ( cn ); |
429 | ensureItemVisible ( cn ); | 429 | ensureItemVisible ( cn ); |
@@ -1683,30 +1683,27 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) | |||
1683 | mActiveItem = cn; | 1683 | mActiveItem = cn; |
1684 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 1684 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
1685 | if ( ci ){ | 1685 | if ( ci ){ |
1686 | showTodo(); | 1686 | showTodo(); |
1687 | cn = (KOTodoViewItem*)cn->itemBelow(); | 1687 | cn = (KOTodoViewItem*)cn->itemBelow(); |
1688 | if ( cn ) { | 1688 | if ( cn ) { |
1689 | mTodoListView->setCurrentItem ( cn ); | 1689 | mTodoListView->setCurrentItem ( cn ); |
1690 | mTodoListView->ensureItemVisible ( cn ); | 1690 | mTodoListView->ensureItemVisible ( cn ); |
1691 | } | 1691 | } |
1692 | 1692 | ||
1693 | } | 1693 | } |
1694 | } | 1694 | } |
1695 | e->accept(); | 1695 | e->accept(); |
1696 | |||
1697 | } | 1696 | } |
1698 | |||
1699 | } | 1697 | } |
1700 | |||
1701 | } | 1698 | } |
1702 | void KOTodoView::updateTodo( Todo * t, int type ) | 1699 | void KOTodoView::updateTodo( Todo * t, int type ) |
1703 | { | 1700 | { |
1704 | if ( mBlockUpdate) | 1701 | if ( mBlockUpdate) |
1705 | return; | 1702 | return; |
1706 | 1703 | ||
1707 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 1704 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
1708 | itemIterator = mTodoMap.find(t); | 1705 | itemIterator = mTodoMap.find(t); |
1709 | if (itemIterator != mTodoMap.end()) { | 1706 | if (itemIterator != mTodoMap.end()) { |
1710 | (*itemIterator)->construct(); | 1707 | (*itemIterator)->construct(); |
1711 | } else { | 1708 | } else { |
1712 | if ( type == KOGlobals::EVENTADDED ) { | 1709 | if ( type == KOGlobals::EVENTADDED ) { |