mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
fix: [regression]scanpopup right context menu lost dictionary list (#989)
* fix: [regression]scanpopup right context menu lost dictionary list * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
8471029770
commit
df4bc68248
|
@ -252,14 +252,11 @@ ArticleView::ArticleView( QWidget * parent,
|
|||
// Variable name for store current selection range
|
||||
rangeVarName = QString( "sr_%1" ).arg( QString::number( (quint64)this, 16 ) );
|
||||
|
||||
if ( const bool fromMainWindow = parent && parent->objectName() == "MainWindow" ) {
|
||||
connect( GlobalBroadcaster::instance(),
|
||||
&GlobalBroadcaster::dictionaryChanges,
|
||||
this,
|
||||
&ArticleView::setActiveDictIds );
|
||||
|
||||
connect( GlobalBroadcaster::instance(), &GlobalBroadcaster::dictionaryClear, this, &ArticleView::dictionaryClear );
|
||||
}
|
||||
connect( GlobalBroadcaster::instance(), &GlobalBroadcaster::dictionaryChanges, this, &ArticleView::setActiveDictIds );
|
||||
|
||||
connect( GlobalBroadcaster::instance(), &GlobalBroadcaster::dictionaryClear, this, &ArticleView::dictionaryClear );
|
||||
|
||||
|
||||
channel = new QWebChannel( webview->page() );
|
||||
agent = new ArticleViewAgent( this );
|
||||
|
@ -1862,6 +1859,8 @@ void ArticleView::pasteTriggered()
|
|||
|
||||
unsigned ArticleView::getCurrentGroup()
|
||||
{
|
||||
if ( !groupComboBox )
|
||||
return currentGroupId;
|
||||
return groupComboBox->getCurrentGroup();
|
||||
}
|
||||
|
||||
|
|
|
@ -132,6 +132,7 @@ ScanPopup::ScanPopup( QWidget * parent,
|
|||
ui.groupList->fill( groups );
|
||||
ui.groupList->setCurrentGroup( cfg.lastPopupGroupId );
|
||||
|
||||
definition->setCurrentGroupId( ui.groupList->getCurrentGroup() );
|
||||
dictionaryBar.setFloatable( false );
|
||||
|
||||
Instances::Group const * igrp = groups.findGroup( cfg.lastPopupGroupId );
|
||||
|
@ -598,6 +599,8 @@ void ScanPopup::currentGroupChanged( int )
|
|||
|
||||
updateDictionaryBar();
|
||||
|
||||
definition->setCurrentGroupId( cfg.lastPopupGroupId );
|
||||
|
||||
if ( isVisible() ) {
|
||||
updateSuggestionList();
|
||||
translateInputFinished();
|
||||
|
|
Loading…
Reference in a new issue