Displays and hides simple preferences correctly
authorRafaël Carré <funman@videolan.org>
Thu, 1 Feb 2007 18:45:53 +0000 (18:45 +0000)
committerRafaël Carré <funman@videolan.org>
Thu, 1 Feb 2007 18:45:53 +0000 (18:45 +0000)
modules/gui/qt4/dialogs/prefs_dialog.cpp

index 24a4810..62d609e 100644 (file)
@@ -155,9 +155,12 @@ void PrefsDialog::changeSimplePanel( QListWidgetItem *item )
         main_panel_l->removeWidget( simple_panel );
         simple_panel->hide();
     }
-    if( !simple_panels[number] )
+    simple_panel = simple_panels[number];
+    if( !simple_panel )
+    {
         simple_panel = new SPrefsPanel( p_intf, main_panel, number );
-    simple_panels[number] = simple_panel;
+        simple_panels[number] = simple_panel;
+    }
     main_panel_l->addWidget( simple_panel );
     simple_panel->show();
 }