mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
Show new translation after group changing
This commit is contained in:
parent
e4adc5f168
commit
52fbeac618
|
@ -1359,7 +1359,10 @@ void MainWindow::currentGroupChanged( QString const & )
|
|||
// Update word search results
|
||||
|
||||
if( !showHistory )
|
||||
{
|
||||
translateInputChanged( ui.translateLine->text() );
|
||||
translateInputFinished( false );
|
||||
}
|
||||
|
||||
updateCurrentGroupProperty();
|
||||
}
|
||||
|
@ -1423,14 +1426,14 @@ void MainWindow::translateInputChanged( QString const & newValue )
|
|||
wordFinder.prefixMatch( req, getActiveDicts() );
|
||||
}
|
||||
|
||||
void MainWindow::translateInputFinished()
|
||||
void MainWindow::translateInputFinished( bool checkModifiers )
|
||||
{
|
||||
QString word = ui.translateLine->text();
|
||||
|
||||
if ( word.size() )
|
||||
{
|
||||
Qt::KeyboardModifiers mods = QApplication::keyboardModifiers();
|
||||
if ( mods & (Qt::ControlModifier | Qt::ShiftModifier) )
|
||||
if ( checkModifiers && ( mods & (Qt::ControlModifier | Qt::ShiftModifier) ) )
|
||||
addNewTab();
|
||||
|
||||
showTranslationFor( word );
|
||||
|
|
|
@ -248,7 +248,7 @@ private slots:
|
|||
|
||||
void currentGroupChanged( QString const & );
|
||||
void translateInputChanged( QString const & );
|
||||
void translateInputFinished();
|
||||
void translateInputFinished( bool checkModifiers = true );
|
||||
|
||||
/// Closes any opened search in the article view, and focuses the translateLine/close main window to tray.
|
||||
void handleEsc();
|
||||
|
|
Loading…
Reference in a new issue