From 89c3eaeff8b1501ce6ff9fbfc45da2799ee00cf6 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Fri, 1 Nov 2024 09:12:52 +0800 Subject: [PATCH] fix: duplicate dictionary in config file --- src/instances.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/instances.cc b/src/instances.cc index 8c817295..9d1bdf05 100644 --- a/src/instances.cc +++ b/src/instances.cc @@ -31,7 +31,8 @@ Group::Group( Config::Group const & cfgGroup, for ( auto const & dict : cfgGroup.dictionaries ) { 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 ] ); dictOrderList.push_back( dictId ); }