mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 12:44:07 +00:00
fix: duplicate dictionary in config file
This commit is contained in:
parent
19bcd94834
commit
89c3eaeff8
|
@ -31,7 +31,8 @@ Group::Group( Config::Group const & cfgGroup,
|
||||||
for ( auto const & dict : cfgGroup.dictionaries ) {
|
for ( auto const & dict : cfgGroup.dictionaries ) {
|
||||||
std::string const dictId = dict.id.toStdString();
|
std::string const dictId = dict.id.toStdString();
|
||||||
|
|
||||||
if ( dictMap.contains( dictId ) ) {
|
//avoid duplicate dictionary in groups in config file.
|
||||||
|
if ( dictMap.contains( dictId ) && !dictOrderList.contains( dictId) ) {
|
||||||
groupDicts.insert( dictId, dictMap[ dictId ] );
|
groupDicts.insert( dictId, dictMap[ dictId ] );
|
||||||
dictOrderList.push_back( dictId );
|
dictOrderList.push_back( dictId );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue