Commit a7ed7a9e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Fix the saving of the preferences to avoid inaccuracies between the panels.

Preferences for dummies ( #603 ) is now almost done in Qt4. Please test and review my commits.
parent a9cce62a
......@@ -143,7 +143,7 @@ void PrefsDialog::setAdvanced()
/* If no advanced Panel exist, create one, attach it and show it*/
if( !advanced_panel )
{
advanced_panel = new AdvPrefsPanel( main_panel );
advanced_panel = new AdvPrefsPanel( main_panel );
main_panel_l->addWidget( advanced_panel );
}
advanced_panel->show();
......@@ -272,19 +272,23 @@ void PrefsDialog::save()
config_SaveConfigFile( p_intf, NULL );
/* Delete the other panel in order to force its reload after clicking
on apply - UGLY but will work for now. */
/* THIS CODE IS STILL WRONG, FIXME */
if( current_simple_panel && current_simple_panel->isVisible() && advanced_panel )
on apply. In fact, if we don't do that, the preferences from the other
panels won't be accurate, so we would have to recreate the whole dialog,
and we don't want that.*/
if( small->isChecked() && advanced_panel )
{
delete advanced_panel;
advanced_panel = NULL;
}
if( advanced_panel && advanced_panel->isVisible() && current_simple_panel )
if( all->isChecked() && current_simple_panel )
{
delete current_simple_panel;
for( int i = 0 ; i< SPrefsMax; i++ )
{
if( simple_panels[i] ) delete simple_panels[i];
}
current_simple_panel = NULL;
}
hide();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment