This commit is contained in:
xiaoyifang 2024-11-11 09:19:29 +08:00
parent c5ca1b7d63
commit 3c5233f2a1
3 changed files with 0 additions and 16 deletions

View file

@ -204,22 +204,11 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups )
// Those hold pointers to dictionaries, we need to free them. // Those hold pointers to dictionaries, we need to free them.
groupInstances.clear(); groupInstances.clear();
// groups.clear();
// orderAndProps.clear();
loadDictionaries( this, cfg, dictionaries, dictNetMgr ); loadDictionaries( this, cfg, dictionaries, dictNetMgr );
if ( rebuildGroups ) { if ( rebuildGroups ) {
// ui.tabs->removeTab( 1 );
// ui.tabs->removeTab( 1 );
orderAndProps->rebuild( savedOrder, savedInactive, dictionaries ); orderAndProps->rebuild( savedOrder, savedInactive, dictionaries );
groups->rebuild( dictionaries, savedGroups, orderAndProps->getCurrentDictionaryOrder() ); groups->rebuild( dictionaries, savedGroups, orderAndProps->getCurrentDictionaryOrder() );
// ui.tabs->insertTab( 1, orderAndProps, QIcon( ":/icons/book.svg" ), tr( "&Dictionaries" ) );
// ui.tabs->insertTab( 2, groups, QIcon( ":/icons/bookcase.svg" ), tr( "&Groups" ) );
// connect( groups, &Groups::showDictionaryInfo, this, &EditDictionaries::showDictionaryInfo );
// connect( orderAndProps, &OrderAndProps::showDictionaryHeadwords, this, &EditDictionaries::showDictionaryHeadwords );
} }
setUpdatesEnabled( true ); setUpdatesEnabled( true );
} }

View file

@ -75,10 +75,7 @@ void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_,
ui.dictionaries->setAsSource(); ui.dictionaries->setAsSource();
ui.dictionaries->populate( Instances::Group( order, dicts, Config::Group() ).dictionaries, dicts ); ui.dictionaries->populate( Instances::Group( order, dicts, Config::Group() ).dictionaries, dicts );
// ui.searchLine->applyTo( ui.dictionaries );
// Populate groups' widget // Populate groups' widget
ui.groups->populate( groups, dicts, ui.dictionaries->getCurrentDictionaries() ); ui.groups->populate( groups, dicts, ui.dictionaries->getCurrentDictionaries() );
countChanged(); countChanged();

View file

@ -146,8 +146,6 @@ void OrderAndProps::rebuild( Config::Group const & dictionaryOrder,
ui.dictionaryOrder->populate( order.dictionaries, allDictionaries ); ui.dictionaryOrder->populate( order.dictionaries, allDictionaries );
ui.inactiveDictionaries->populate( inactive.dictionaries, allDictionaries ); ui.inactiveDictionaries->populate( inactive.dictionaries, allDictionaries );
// ui.searchLine->applyTo( ui.dictionaryOrder );
disableDictionaryDescription(); disableDictionaryDescription();
showDictNumbers(); showDictNumbers();