summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index d825493..940d288 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -124,6 +124,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
e->ignore();
break;
}
+ if ( count() ) {
setCurrentItem((currentItem()+count()-1)%count());
if(!itemVisible(currentItem())) {
if((unsigned int) currentItem() == (count()-1)) {
@@ -132,12 +133,14 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
setTopItem(topItem()-1);
}
}
+ }
break;
case Key_Down:
if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
e->ignore();
break;
}
+ if ( count () ) {
setCurrentItem((currentItem()+1)%count());
if(!itemVisible(currentItem())) {
if(currentItem() == 0) {
@@ -146,6 +149,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
setTopItem(topItem()+1);
}
}
+ }
break;
case Key_I:
QTimer::singleShot( 11, this, SLOT ( oneDown() ) );
@@ -162,6 +166,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
void KNoScrollListBox::oneDown()
{
+ if ( count () ) {
setCurrentItem((currentItem()+1)%count());
if(!itemVisible(currentItem())) {
if(currentItem() == 0) {
@@ -171,6 +176,7 @@ void KNoScrollListBox::oneDown()
}
}
}
+}
void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
{
switch(e->key()) {