summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-03-29 00:10:48 (UTC)
committer zautrix <zautrix>2005-03-29 00:10:48 (UTC)
commita5d52c19d2cd9b008e5cf41d5c7d2c193df7ee46 (patch) (unidiff)
treeb9f1b2710da1cd0105382831ac0a3e3d7d44f09c /korganizer
parent4e7c45695672ecdbd0cd14cac0ea29a8e134ee78 (diff)
downloadkdepimpi-a5d52c19d2cd9b008e5cf41d5c7d2c193df7ee46.zip
kdepimpi-a5d52c19d2cd9b008e5cf41d5c7d2c193df7ee46.tar.gz
kdepimpi-a5d52c19d2cd9b008e5cf41d5c7d2c193df7ee46.tar.bz2
fix
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)
124 e->ignore(); 124 e->ignore();
125 break; 125 break;
126 } 126 }
127 if ( count() ) {
127 setCurrentItem((currentItem()+count()-1)%count()); 128 setCurrentItem((currentItem()+count()-1)%count());
128 if(!itemVisible(currentItem())) { 129 if(!itemVisible(currentItem())) {
129 if((unsigned int) currentItem() == (count()-1)) { 130 if((unsigned int) currentItem() == (count()-1)) {
@@ -132,12 +133,14 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
132 setTopItem(topItem()-1); 133 setTopItem(topItem()-1);
133 } 134 }
134 } 135 }
136 }
135 break; 137 break;
136 case Key_Down: 138 case Key_Down:
137 if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { 139 if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
138 e->ignore(); 140 e->ignore();
139 break; 141 break;
140 } 142 }
143 if ( count () ) {
141 setCurrentItem((currentItem()+1)%count()); 144 setCurrentItem((currentItem()+1)%count());
142 if(!itemVisible(currentItem())) { 145 if(!itemVisible(currentItem())) {
143 if(currentItem() == 0) { 146 if(currentItem() == 0) {
@@ -146,6 +149,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
146 setTopItem(topItem()+1); 149 setTopItem(topItem()+1);
147 } 150 }
148 } 151 }
152 }
149 break; 153 break;
150 case Key_I: 154 case Key_I:
151 QTimer::singleShot( 11, this, SLOT ( oneDown() ) ); 155 QTimer::singleShot( 11, this, SLOT ( oneDown() ) );
@@ -162,6 +166,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
162 166
163void KNoScrollListBox::oneDown() 167void KNoScrollListBox::oneDown()
164{ 168{
169 if ( count () ) {
165 setCurrentItem((currentItem()+1)%count()); 170 setCurrentItem((currentItem()+1)%count());
166 if(!itemVisible(currentItem())) { 171 if(!itemVisible(currentItem())) {
167 if(currentItem() == 0) { 172 if(currentItem() == 0) {
@@ -171,6 +176,7 @@ void KNoScrollListBox::oneDown()
171 } 176 }
172 } 177 }
173} 178}
179}
174void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) 180void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
175{ 181{
176 switch(e->key()) { 182 switch(e->key()) {