author | zautrix <zautrix> | 2005-08-05 21:59:14 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-05 21:59:14 (UTC) |
commit | cd215c243d0636cabbc73006652b9b6783319de1 (patch) (side-by-side diff) | |
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 @@ -385,65 +385,65 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) if ( !internalDrop ) { qDebug("Dnd: External Copy"); } else qDebug("DnD: Internal copy: Copy pending"); } } } #endif } void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) { if ( !e->isAutoRepeat() ) { mFlagKeyPressed = false; } } void KOTodoListView::keyPressEvent ( QKeyEvent * e ) { qApp->processEvents(); if ( !isVisible() ) { e->ignore(); return; } if ( e->isAutoRepeat() && !mFlagKeyPressed ) { e->ignore(); // qDebug(" ignore %d",e->isAutoRepeat() ); return; } if (! e->isAutoRepeat() ) mFlagKeyPressed = true; QListViewItem* cn; - if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { + if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") { cn = currentItem(); if ( cn ) { KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); if ( ci ){ if ( e->state() == ShiftButton ) ci->setOn( false ); else ci->setOn( true ); cn = cn->itemBelow(); if ( cn ) { setCurrentItem ( cn ); ensureItemVisible ( cn ); } } } e->accept(); return; } if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { switch ( e->key() ) { case Qt::Key_Down: case Qt::Key_Up: QListView::keyPressEvent ( e ); e->accept(); break; case Qt::Key_Left: case Qt::Key_Right: QListView::keyPressEvent ( e ); e->accept(); @@ -1663,62 +1663,59 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) itemClicked(mActiveItem); e->accept(); } else e->ignore(); break; case Qt::Key_Escape: if ( pendingSubtodo ) { itemClicked(0); e->accept(); } else e->ignore(); break; default: e->ignore(); } if ( true ) { if ( e->key() == Qt::Key_I ) { KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); if ( cn ) { mActiveItem = cn; KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); if ( ci ){ showTodo(); cn = (KOTodoViewItem*)cn->itemBelow(); if ( cn ) { mTodoListView->setCurrentItem ( cn ); mTodoListView->ensureItemVisible ( cn ); } } } - e->accept(); - + e->accept(); } - } - } void KOTodoView::updateTodo( Todo * t, int type ) { if ( mBlockUpdate) return; QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; itemIterator = mTodoMap.find(t); if (itemIterator != mTodoMap.end()) { (*itemIterator)->construct(); } else { if ( type == KOGlobals::EVENTADDED ) { insertTodoItem( t ); } } } void KOTodoView::todoModified(Todo * t , int p ) { mBlockUpdate = true; emit todoModifiedSignal ( t, p ); mBlockUpdate = false; } |