-rw-r--r-- | korganizer/kolistview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index e560ce4..b236c2d 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -1264,48 +1264,50 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) | |||
1264 | ensureItemVisible ( cn ); | 1264 | ensureItemVisible ( cn ); |
1265 | } | 1265 | } |
1266 | emit showIncidence( ci->data()); | 1266 | emit showIncidence( ci->data()); |
1267 | } | 1267 | } |
1268 | } | 1268 | } |
1269 | e->accept(); | 1269 | e->accept(); |
1270 | } | 1270 | } |
1271 | break; | 1271 | break; |
1272 | case Qt::Key_Return: | 1272 | case Qt::Key_Return: |
1273 | case Qt::Key_Enter: | 1273 | case Qt::Key_Enter: |
1274 | { | 1274 | { |
1275 | QListViewItem* cn; | 1275 | QListViewItem* cn; |
1276 | cn = currentItem(); | 1276 | cn = currentItem(); |
1277 | if ( cn ) { | 1277 | if ( cn ) { |
1278 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1278 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1279 | if ( ci ){ | 1279 | if ( ci ){ |
1280 | if ( e->state() == ShiftButton ) | 1280 | if ( e->state() == ShiftButton ) |
1281 | ci->setSelected( false ); | 1281 | ci->setSelected( false ); |
1282 | else | 1282 | else |
1283 | ci->setSelected( true ); | 1283 | ci->setSelected( true ); |
1284 | cn = cn->nextSibling(); | 1284 | cn = cn->nextSibling(); |
1285 | if ( cn ) { | 1285 | if ( cn ) { |
1286 | setCurrentItem ( cn ); | 1286 | setCurrentItem ( cn ); |
1287 | ensureItemVisible ( cn ); | 1287 | ensureItemVisible ( cn ); |
1288 | } else { | ||
1289 | emit currentChanged( ci ); | ||
1288 | } | 1290 | } |
1289 | } | 1291 | } |
1290 | } | 1292 | } |
1291 | e->accept(); | 1293 | e->accept(); |
1292 | } | 1294 | } |
1293 | break; | 1295 | break; |
1294 | default: | 1296 | default: |
1295 | e->ignore(); | 1297 | e->ignore(); |
1296 | } | 1298 | } |
1297 | } | 1299 | } |
1298 | KOListViewListView::KOListViewListView(KOListView * lv ) | 1300 | KOListViewListView::KOListViewListView(KOListView * lv ) |
1299 | : KListView( lv, "kolistlistview", false ) | 1301 | : KListView( lv, "kolistlistview", false ) |
1300 | { | 1302 | { |
1301 | mYMousePos = 0; | 1303 | mYMousePos = 0; |
1302 | mPopupTimer = new QTimer(this); | 1304 | mPopupTimer = new QTimer(this); |
1303 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); | 1305 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); |
1304 | #ifndef DESKTOP_VERSION | 1306 | #ifndef DESKTOP_VERSION |
1305 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 1307 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
1306 | #endif | 1308 | #endif |
1307 | setSelectionMode( QListView::Multi ); | 1309 | setSelectionMode( QListView::Multi ); |
1308 | setMultiSelection( true); | 1310 | setMultiSelection( true); |
1309 | } | 1311 | } |
1310 | bool KOListViewListView::hasMultiSelection(QListViewItem* item) | 1312 | bool KOListViewListView::hasMultiSelection(QListViewItem* item) |
1311 | { | 1313 | { |