diff --git a/mainwindow.cc b/mainwindow.cc index 1d7c658e..002f6bdf 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -2583,7 +2583,7 @@ bool MainWindow::eventFilter( QObject * obj, QEvent * ev ) else if ( obj == wordList ) { - if ( ev->type() == QEvent::KeyPress ) + if (ev->type() == QEvent::KeyPress || ev->type() == QEvent::ShortcutOverride) { QKeyEvent * keyEvent = static_cast< QKeyEvent * >( ev ); @@ -2634,7 +2634,7 @@ bool MainWindow::eventFilter( QObject * obj, QEvent * ev ) } else if (obj == ui.dictsList) { - if ( ev->type() == QEvent::KeyPress ) + if ( ev->type() == QEvent::KeyPress || ev->type() == QEvent::ShortcutOverride) { QKeyEvent * keyEvent = static_cast< QKeyEvent * >( ev ); @@ -2768,10 +2768,11 @@ void MainWindow::typingEvent( QString const & t ) if( translateLine->isEnabled() ) { - //translateLine->setFocus(); - // Escaping the typed-in characters is the user's responsibility. - setTranslateBoxTextAndClearSuffix( t, WildcardsAreAlreadyEscaped, EnablePopup ); - translateLine->setCursorPosition( t.size() ); + translateLine->clear(); + translateLine->setFocus(); + // Escaping the typed-in characters is the user's responsibility. + // setTranslateBoxTextAndClearSuffix( t, WildcardsAreAlreadyEscaped, EnablePopup ); + // translateLine->setCursorPosition( t.size() ); } } } diff --git a/scanpopup.cc b/scanpopup.cc index 4a16d75d..e911d67c 100644 --- a/scanpopup.cc +++ b/scanpopup.cc @@ -856,9 +856,10 @@ void ScanPopup::typingEvent( QString const & t ) } else { - ui.translateBox->translateLine()->setFocus(); - ui.translateBox->setText( t, true ); - ui.translateBox->translateLine()->setCursorPosition( t.size() ); + ui.translateBox->translateLine()->clear(); + ui.translateBox->translateLine()->setFocus(); + // ui.translateBox->setText( t, true ); + // ui.translateBox->translateLine()->setCursorPosition( t.size() ); } }