From c8f03542275523e58cf626607a24d8eb3b6eb95a Mon Sep 17 00:00:00 2001 From: Abs62 Date: Fri, 9 May 2014 22:53:19 +0400 Subject: [PATCH] Scan popup: Fix filling of suggestion list when muted dictionaries are presented --- scanpopup.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scanpopup.cc b/scanpopup.cc index 157da6e5..119b52fd 100644 --- a/scanpopup.cc +++ b/scanpopup.cc @@ -429,10 +429,6 @@ void ScanPopup::engagePopup( bool forcePopup, bool giveFocus ) definition->setSelectionBySingleClick( cfg.preferences.selectWordBySingleClick ); - /// Too large strings make window expand which is probably not what user - /// wants - ui.translateBox->setText( inputWord, false ); - if ( !isVisible() ) { // Need to show the window @@ -504,6 +500,10 @@ void ScanPopup::engagePopup( bool forcePopup, bool giveFocus ) if ( ui.pinButton->isChecked() ) setWindowTitle( tr( "%1 - %2" ).arg( elideInputWord(), "GoldenDict" ) ); + /// Too large strings make window expand which is probably not what user + /// wants + ui.translateBox->setText( inputWord, false ); + showTranslationFor( inputWord ); } @@ -1001,6 +1001,9 @@ void ScanPopup::updateDictionaryBar() void ScanPopup::mutedDictionariesChanged() { + // Update suggestion list + translateInputChanged( ui.translateBox->translateLine()->text() ); + if ( dictionaryBar.toggleViewAction()->isChecked() ) definition->updateMutedContents(); }