mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
Merge pull request #1034 from xiaoyifang/fix/float-lose-focuse
fix: translate line in floatable toolbar will lose focus
This commit is contained in:
commit
217ba5318a
|
@ -2402,7 +2402,10 @@ void MainWindow::respondToTranslationRequest( QString const & word, bool checkMo
|
|||
activateWindow();
|
||||
}
|
||||
|
||||
getCurrentArticleView()->focus();
|
||||
auto view = getCurrentArticleView();
|
||||
|
||||
view->activateWindow();
|
||||
view->focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2703,6 +2706,9 @@ void MainWindow::typingEvent( QString const & t )
|
|||
ui.searchPane->activateWindow();
|
||||
|
||||
if ( translateLine->isEnabled() ) {
|
||||
if ( navToolbar->isFloating() )
|
||||
navToolbar->activateWindow();
|
||||
|
||||
translateLine->clear();
|
||||
translateLine->setFocus();
|
||||
// Escaping the typed-in characters is the user's responsibility.
|
||||
|
|
Loading…
Reference in a new issue