mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
fix: validate the dictionary when push it into the variable
This commit is contained in:
parent
dca702e77d
commit
c2a6b9b7d9
|
@ -45,9 +45,11 @@ Group::Group( Config::Group const & cfgGroup,
|
|||
}
|
||||
}
|
||||
for ( const auto & dictId : dictOrderList ) {
|
||||
if ( groupDicts.contains( dictId ) ) {
|
||||
dictionaries.push_back( groupDicts[ dictId ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Group::Group( QString const & name_ ):
|
||||
id( 0 ),
|
||||
|
|
|
@ -1652,8 +1652,8 @@ void MainWindow::updateDictionaryBar()
|
|||
if ( currentId == Instances::Group::AllGroupId )
|
||||
dictionaryBar.setMutedDictionaries( &cfg.mutedDictionaries );
|
||||
else {
|
||||
Config::Group * grp = cfg.getGroup( currentId );
|
||||
dictionaryBar.setMutedDictionaries( grp ? &grp->mutedDictionaries : nullptr );
|
||||
Config::Group * _grp = cfg.getGroup( currentId );
|
||||
dictionaryBar.setMutedDictionaries( _grp ? &_grp->mutedDictionaries : nullptr );
|
||||
}
|
||||
|
||||
dictionaryBar.setDictionaries( grp->dictionaries );
|
||||
|
|
Loading…
Reference in a new issue