Commit 12efc09f authored by Christophe Mutricy's avatar Christophe Mutricy

Improve stability of the preferences dialog. Patch by Andre Weber

parent bad2a6b1
...@@ -19,6 +19,7 @@ Alex Izvorski <aizvorski at gmail dot com> - some more x264 options ...@@ -19,6 +19,7 @@ Alex Izvorski <aizvorski at gmail dot com> - some more x264 options
Andrea Guzzo <xant at xant dot net> - dc1394 firewire support Andrea Guzzo <xant at xant dot net> - dc1394 firewire support
André de Barros Martins Ribeiro <andrerib at ajato.com.br> - Brazilian portuguese localization André de Barros Martins Ribeiro <andrerib at ajato.com.br> - Brazilian portuguese localization
Andre Pang <adre.pang at csiro dot au> - Annodex support Andre Pang <adre.pang at csiro dot au> - Annodex support
Andre Weber <WeberAndre at gmx d0t de> - Qt4 patches
Andres Krapf <dae at via.ecp.fr> - FreeBSD port and tests, KDE interface Andres Krapf <dae at via.ecp.fr> - FreeBSD port and tests, KDE interface
Andrey Brilevskiy <director at macwest.ru> - Russian translation Andrey Brilevskiy <director at macwest.ru> - Russian translation
Andy Lindsay <andy_vl at ananam.com> - fixes in the TS demux Andy Lindsay <andy_vl at ananam.com> - fixes in the TS demux
......
...@@ -211,10 +211,12 @@ void PrefsDialog::changeAdvPanel( QTreeWidgetItem *item ) ...@@ -211,10 +211,12 @@ void PrefsDialog::changeAdvPanel( QTreeWidgetItem *item )
if( advanced_panel->isVisible() ) advanced_panel->hide(); if( advanced_panel->isVisible() ) advanced_panel->hide();
if( !data->panel ) if( !data->panel )
{
data->panel = new AdvPrefsPanel( p_intf, main_panel , data ); data->panel = new AdvPrefsPanel( p_intf, main_panel , data );
main_panel_l->addWidget( data->panel );
}
advanced_panel = data->panel; advanced_panel = data->panel;
main_panel_l->addWidget( advanced_panel );
advanced_panel->show(); advanced_panel->show();
} }
...@@ -277,14 +279,21 @@ void PrefsDialog::save() ...@@ -277,14 +279,21 @@ void PrefsDialog::save()
and we don't want that.*/ and we don't want that.*/
if( small->isChecked() && advanced_panel ) if( small->isChecked() && advanced_panel )
{ {
delete advanced_panel; /* Deleting only the active panel from the advanced config doesn't work
because the data records of PrefsItemData contains still a
reference to it only cleanAll() is sure to remove all Panels! */
advanced_tree->cleanAll();
advanced_panel = NULL; advanced_panel = NULL;
} }
if( all->isChecked() && current_simple_panel ) if( all->isChecked() && current_simple_panel )
{ {
for( int i = 0 ; i< SPrefsMax; i++ ) for( int i = 0 ; i< SPrefsMax; i++ )
{ {
if( simple_panels[i] ) delete simple_panels[i]; if( simple_panels[i] )
{
delete simple_panels[i];
simple_panels[i] = NULL;
}
} }
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