1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-04 09:11:33 +02:00

Improve stability of the preferences dialog. Patch by Andre Weber

This commit is contained in:
Christophe Mutricy 2007-11-29 22:22:40 +00:00
parent bad2a6b1f2
commit 12efc09f66
2 changed files with 13 additions and 3 deletions

1
THANKS
View File

@ -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
André de Barros Martins Ribeiro <andrerib at ajato.com.br> - Brazilian portuguese localization
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
Andrey Brilevskiy <director at macwest.ru> - Russian translation
Andy Lindsay <andy_vl at ananam.com> - fixes in the TS demux

View File

@ -211,10 +211,12 @@ void PrefsDialog::changeAdvPanel( QTreeWidgetItem *item )
if( advanced_panel->isVisible() ) advanced_panel->hide();
if( !data->panel )
{
data->panel = new AdvPrefsPanel( p_intf, main_panel , data );
main_panel_l->addWidget( data->panel );
}
advanced_panel = data->panel;
main_panel_l->addWidget( advanced_panel );
advanced_panel->show();
}
@ -277,14 +279,21 @@ void PrefsDialog::save()
and we don't want that.*/
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;
}
if( all->isChecked() && current_simple_panel )
{
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;
}