]> git.sesse.net Git - vlc/commitdiff
Automatically refresh the v4l2 extended panel on focus.
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 8 Dec 2007 23:00:51 +0000 (23:00 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 8 Dec 2007 23:00:51 +0000 (23:00 +0000)
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.hpp

index f933aa23673f9216fd356afcb964ab13fdbb3359..034bdb06383cec30e31ab2049d78784027903382 100644 (file)
@@ -577,6 +577,12 @@ ExtV4l2::~ExtV4l2()
         delete box;
 }
 
+void ExtV4l2::showEvent( QShowEvent *event )
+{
+    QWidget::showEvent( event );
+    Refresh();
+}
+
 void ExtV4l2::Refresh( void )
 {
     vlc_object_t *p_obj = (vlc_object_t*)vlc_object_find_name( p_intf, "v4l2", FIND_ANYWHERE );
@@ -620,7 +626,7 @@ void ExtV4l2::Refresh( void )
                 case VLC_VAR_INTEGER:
                 {
                     QLabel *label = new QLabel( psz_label, box );
-                    QHBoxLayout *hlayout = new QHBoxLayout( box );
+                    QHBoxLayout *hlayout = new QHBoxLayout();
                     hlayout->addWidget( label );
                     int i_val = var_GetInteger( p_obj, psz_var );
                     if( i_type & VLC_VAR_HASCHOICE )
index fc5892cf4995a6571e6593ee43d864f0787c4666..c0aa71c6e0bf03dc9d1419bcde5cfb32608622f5 100644 (file)
@@ -63,6 +63,8 @@ public:
     ExtV4l2( intf_thread_t *, QWidget * );
     virtual ~ExtV4l2();
 
+    virtual void showEvent( QShowEvent *event );
+
 private:
     intf_thread_t *p_intf;
     Ui::ExtV4l2Widget ui;