[vlc-commits] Qt4: fix compressor and spatializer initializer order (fixes #7296)

Rémi Denis-Courmont git at videolan.org
Mon Aug 20 14:22:07 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 20 15:21:07 2012 +0300| [accf189a2554fb52e4a362be55124f13f510fdfb] | committer: Rémi Denis-Courmont

Qt4: fix compressor and spatializer initializer order (fixes #7296)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=accf189a2554fb52e4a362be55124f13f510fdfb
---

 modules/gui/qt4/components/extended_panels.cpp |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 3127a3d..719318c 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -1277,8 +1277,6 @@ Compressor::Compressor( intf_thread_t *_p_intf, QWidget *_parent )
 
         oldControlVars[i] = comp_controls[i].f_value;
 
-        CONNECT( compCtrl[i], valueChanged( int ), this, setInitValues() );
-
         ctrl_texts[i] = new QLabel( qtr( comp_controls[i].psz_descs ) + "\n" );
         ctrl_texts[i]->setFont( smallFont );
         ctrl_texts[i]->setAlignment( Qt::AlignHCenter );
@@ -1292,6 +1290,9 @@ Compressor::Compressor( intf_thread_t *_p_intf, QWidget *_parent )
         layout->addWidget( ctrl_texts[i],   3, i, Qt::AlignHCenter );
     }
 
+    for( int i = 0; i < NUM_CP_CTRL; i++ )
+        CONNECT( compCtrl[i], valueChanged( int ), this, setInitValues() );
+
     BUTTONACT( enableCheck, enable() );
 
     /* Write down initial values */
@@ -1421,8 +1422,6 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
         spatCtrl[i]->setValue( (int)var_InheritFloat( p_intf, spat_controls[i].psz_name ) * 10. );
         oldControlVars[i] = spatCtrl[i]->value();
 
-        CONNECT( spatCtrl[i], valueChanged( int ), this, setInitValues() );
-
         ctrl_texts[i] = new QLabel( qtr( spat_controls[i].psz_desc ) + "\n" );
         ctrl_texts[i]->setFont( smallFont );
 
@@ -1436,6 +1435,9 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
     }
     spatCtrl[0]->setRange( 0, 11 );
 
+    for( int i = 0; i < NUM_SP_CTRL; i++ )
+        CONNECT( spatCtrl[i], valueChanged( int ), this, setInitValues() );
+
     BUTTONACT( enableCheck, enable() );
 
     /* Write down initial values */



More information about the vlc-commits mailing list