author | zautrix <zautrix> | 2005-01-27 10:15:45 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-27 10:15:45 (UTC) |
commit | 1501a5d8a25e3474fb450d7e0b272feb14821d1c (patch) (side-by-side diff) | |
tree | 70a8fcafed89f6dc8225af9908e845c0feecd7d9 /korganizer/komonthview.cpp | |
parent | e4beb835276376646307bea74430008c332bd387 (diff) | |
download | kdepimpi-1501a5d8a25e3474fb450d7e0b272feb14821d1c.zip kdepimpi-1501a5d8a25e3474fb450d7e0b272feb14821d1c.tar.gz kdepimpi-1501a5d8a25e3474fb450d7e0b272feb14821d1c.tar.bz2 |
fix
-rw-r--r-- | korganizer/komonthview.cpp | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 437debe..10e4f1d 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -115,7 +115,10 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) scrollBy(-4,0); break; case Key_Up: - if(!count()) break; + if(count() < 2) { + e->ignore(); + break; + } setCurrentItem((currentItem()+count()-1)%count()); if(!itemVisible(currentItem())) { if((unsigned int) currentItem() == (count()-1)) { @@ -126,7 +129,10 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) } break; case Key_Down: - if(!count()) break; + if(count() < 2) { + e->ignore(); + break; + } setCurrentItem((currentItem()+1)%count()); if(!itemVisible(currentItem())) { if(currentItem() == 0) { @@ -949,6 +955,7 @@ void KOMonthView::changeEventDisplay(Event *, int) void KOMonthView::updateView() { + if ( !updatePossible ) return; //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); @@ -960,6 +967,7 @@ void KOMonthView::updateView() //qDebug("KOMonthView::updateView() "); processSelectionChange(); // qDebug("---------------------------------------------------------------------+ "); + setFocus(); } void KOMonthView::resizeEvent(QResizeEvent * e) @@ -1123,7 +1131,24 @@ void KOMonthView::clearSelection() } void KOMonthView::keyPressEvent ( QKeyEvent * e ) { - + switch(e->key()) { + break; + case Key_Up: + { + emit prevMonth(); + setFocus(); + } + e->accept(); + break; + case Key_Down: + { + emit nextMonth(); + setFocus(); + } + e->accept(); + break; + default: e->ignore(); - + break; + } } |