This commit is contained in:
YiFang Xiao 2024-11-04 21:25:44 +08:00 committed by xiaoyifang
parent 59d01868da
commit 5bef4cef22
3 changed files with 6 additions and 8 deletions

View file

@ -204,12 +204,11 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups )
// Those hold pointers to dictionaries, we need to free them.
groupInstances.clear();
groups.clear();
orderAndProps.clear();
// groups.clear();
// orderAndProps.clear();
loadDictionaries( this, cfg, dictionaries, dictNetMgr );
if ( rebuildGroups ) {
// ui.tabs->removeTab( 1 );
// ui.tabs->removeTab( 1 );

View file

@ -68,8 +68,7 @@ void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_,
Config::Groups const & groups_,
Config::Group const & order )
{
setUpdatesEnabled( false );
this->setUpdatesEnabled( false );
dicts = dicts_;
groups = groups_;
@ -83,7 +82,7 @@ void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_,
ui.groups->populate( groups, dicts, ui.dictionaries->getCurrentDictionaries() );
countChanged();
setUpdatesEnabled( true );
this->setUpdatesEnabled( true );
}
void Groups::editGroup( unsigned id )

View file

@ -18,7 +18,7 @@ public:
std::vector< sptr< Dictionary::Class > > const &,
Config::Groups const &,
Config::Group const & order );
void rebuild( vector< sptr< Dictionary::Class > > const & dicts_,
void rebuild( std::vector< sptr< Dictionary::Class > > const & dicts_,
Config::Groups const & groups_,
Config::Group const & order );
/// Instructs the dialog to position itself on editing the given group.
@ -33,7 +33,7 @@ public:
private:
Ui::Groups ui;
std::vector< sptr< Dictionary::Class > > const & dicts;
std::vector< sptr< Dictionary::Class > > dicts;
Config::Groups groups;
QToolButton * groupsListButton;