mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
fix: duplicate dictionary in config file (#1886)
* fix: duplicate dictionary in config file * [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
19bcd94834
commit
8a92cbf34a
|
@ -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