Diffstat (limited to 'kaddressbook/views/cardview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/views/cardview.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp index 65f793c..6351c11 100644 --- a/kaddressbook/views/cardview.cpp +++ b/kaddressbook/views/cardview.cpp @@ -655,8 +655,9 @@ CardView::CardView(QWidget *parent, const char *name) viewport()->setFocusPolicy(WheelFocus); viewport()->setBackgroundMode(PaletteBase); connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) ); + connect( this, SIGNAL(executed(CardViewItem *)), this, SIGNAL( doubleClicked(CardViewItem *)) ); //US setBackgroundMode(PaletteBackground, PaletteBase); setBackgroundMode(PaletteBackground); @@ -1265,10 +1266,10 @@ void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) if (item && !KGlobalSettings::singleClick()) { emit executed(item); - } - emit doubleClicked(item); + } else + emit doubleClicked(item); } void CardView::contentsMouseMoveEvent( QMouseEvent *e ) { @@ -1451,11 +1452,13 @@ void CardView::keyPressEvent( QKeyEvent *e ) setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() ); emit selectionChanged(); break; case Key_Return: - case Key_Enter: - emit returnPressed( d->mCurrentItem ); - emit executed( d->mCurrentItem ); + case Key_Enter: + { + emit returnPressed( d->mCurrentItem ); + emit executed( d->mCurrentItem ); + } break; default: if ( (e->state() & ControlButton) && e->key() == Key_A ) { |