mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 03:14:06 +00:00
1
This commit is contained in:
parent
dcb2e555c4
commit
633f2dae53
|
@ -204,12 +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();
|
// groups.clear();
|
||||||
orderAndProps.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 );
|
||||||
// ui.tabs->removeTab( 1 );
|
// ui.tabs->removeTab( 1 );
|
||||||
|
|
|
@ -68,8 +68,7 @@ void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_,
|
||||||
Config::Groups const & groups_,
|
Config::Groups const & groups_,
|
||||||
Config::Group const & order )
|
Config::Group const & order )
|
||||||
{
|
{
|
||||||
|
this->setUpdatesEnabled( false );
|
||||||
setUpdatesEnabled( false );
|
|
||||||
dicts = dicts_;
|
dicts = dicts_;
|
||||||
groups = groups_;
|
groups = groups_;
|
||||||
|
|
||||||
|
@ -83,7 +82,7 @@ void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_,
|
||||||
ui.groups->populate( groups, dicts, ui.dictionaries->getCurrentDictionaries() );
|
ui.groups->populate( groups, dicts, ui.dictionaries->getCurrentDictionaries() );
|
||||||
|
|
||||||
countChanged();
|
countChanged();
|
||||||
setUpdatesEnabled( true );
|
this->setUpdatesEnabled( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Groups::editGroup( unsigned id )
|
void Groups::editGroup( unsigned id )
|
||||||
|
|
|
@ -18,7 +18,7 @@ public:
|
||||||
std::vector< sptr< Dictionary::Class > > const &,
|
std::vector< sptr< Dictionary::Class > > const &,
|
||||||
Config::Groups const &,
|
Config::Groups const &,
|
||||||
Config::Group const & order );
|
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::Groups const & groups_,
|
||||||
Config::Group const & order );
|
Config::Group const & order );
|
||||||
/// Instructs the dialog to position itself on editing the given group.
|
/// Instructs the dialog to position itself on editing the given group.
|
||||||
|
@ -33,7 +33,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::Groups ui;
|
Ui::Groups ui;
|
||||||
std::vector< sptr< Dictionary::Class > > const & dicts;
|
std::vector< sptr< Dictionary::Class > > dicts;
|
||||||
Config::Groups groups;
|
Config::Groups groups;
|
||||||
|
|
||||||
QToolButton * groupsListButton;
|
QToolButton * groupsListButton;
|
||||||
|
|
Loading…
Reference in a new issue