From cfa66ff0a1f34542a449d619e6a8b56277050810 Mon Sep 17 00:00:00 2001 From: Tvangeste Date: Mon, 24 Dec 2012 22:56:31 +0100 Subject: [PATCH] Fixed regression #141. --- mainwindow.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mainwindow.cc b/mainwindow.cc index 7c1eacbf..d71e88ba 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -495,16 +495,11 @@ MainWindow::MainWindow( Config::Class & cfg_ ): connect( translateBox->translateLine(), SIGNAL( returnPressed() ), this, SLOT( translateInputFinished() ) ); - if (searchInDock) - { - connect( wordList, SIGNAL( itemSelectionChanged() ), - this, SLOT( wordListSelectionChanged() ) ); - } - else - { - connect( wordList, SIGNAL( itemDoubleClicked ( QListWidgetItem * ) ), - this, SLOT( wordListItemActivated( QListWidgetItem * ) ) ); - } + connect( ui.wordList, SIGNAL( itemSelectionChanged() ), + this, SLOT( wordListSelectionChanged() ) ); + + connect( translateBox->wordList(), SIGNAL( itemDoubleClicked ( QListWidgetItem * ) ), + this, SLOT( wordListItemActivated( QListWidgetItem * ) ) ); connect( ui.wordList, SIGNAL( itemClicked( QListWidgetItem * ) ), this, SLOT( wordListItemActivated( QListWidgetItem * ) ) ); @@ -1898,6 +1893,7 @@ bool MainWindow::eventFilter( QObject * obj, QEvent * ev ) if ( keyEvent->matches( QKeySequence::MoveToNextLine ) && wordList->count() ) { wordList->setFocus( Qt::ShortcutFocusReason ); + wordList->setCurrentRow( 0, QItemSelectionModel::ClearAndSelect ); return true; } }