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
...@@ -272,16 +272,20 @@ void PrefsDialog::save() ...@@ -272,16 +272,20 @@ void PrefsDialog::save()
config_SaveConfigFile( p_intf, NULL ); config_SaveConfigFile( p_intf, NULL );
/* Delete the other panel in order to force its reload after clicking /* Delete the other panel in order to force its reload after clicking
on apply - UGLY but will work for now. */ on apply. In fact, if we don't do that, the preferences from the other
/* THIS CODE IS STILL WRONG, FIXME */ panels won't be accurate, so we would have to recreate the whole dialog,
if( current_simple_panel && current_simple_panel->isVisible() && advanced_panel ) and we don't want that.*/
if( small->isChecked() && advanced_panel )
{ {
delete advanced_panel; delete advanced_panel;
advanced_panel = NULL; 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; current_simple_panel = NULL;
} }
......
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