From e19f7eeeda1a07ffced2bbd1262f220befd8dbee Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Thu, 31 Oct 2024 10:04:57 +0800 Subject: [PATCH] opt: backup group info --- src/config.hh | 6 ++++++ src/ui/editdictionaries.cc | 1 - src/ui/editdictionaries.hh | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/config.hh b/src/config.hh index b4fd242f6..87b80aa27 100644 --- a/src/config.hh +++ b/src/config.hh @@ -827,6 +827,12 @@ enum class ToolbarsIconSize : std::uint8_t { Large = 2, }; +struct Group{ + Group dictionaryOrder; + Group inactiveDictionaries; + Groups groups; +} + struct Class { Paths paths; diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index 1fdfa0e67..e865f9dfb 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -19,7 +19,6 @@ EditDictionaries::EditDictionaries( QWidget * parent, dictionaries( dictionaries_ ), groupInstances( groupInstances_ ), dictNetMgr( dictNetMgr_ ), - origCfg( cfg ), sources( this, cfg ), orderAndProps( std::make_shared< OrderAndProps >( this, cfg.dictionaryOrder, cfg.inactiveDictionaries, dictionaries ) ), diff --git a/src/ui/editdictionaries.hh b/src/ui/editdictionaries.hh index a568fede3..c9d6432b1 100644 --- a/src/ui/editdictionaries.hh +++ b/src/ui/editdictionaries.hh @@ -79,7 +79,7 @@ private: QNetworkAccessManager & dictNetMgr; // Backed up to decide later if something was changed or not - Config::Class origCfg; + Config::Group origCfg; Ui::EditDictionaries ui; Sources sources;