[vlc-commits] Qt: restart filter when options can't be applied

Jean-Baptiste Kempf git at videolan.org
Sat Aug 13 02:10:26 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Aug 13 02:09:01 2011 +0200| [be47b39976a64490bf4f3e659a8652a533a2893a] | committer: Jean-Baptiste Kempf

Qt: restart filter when options can't be applied

Close #5168

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

 modules/gui/qt4/components/extended_panels.cpp |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index e62c31f..fdb9a37 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -567,14 +567,6 @@ void ExtVideo::updateFilterOptions()
         b_is_command = ( i_type & VLC_VAR_ISCOMMAND );
     }
 
-    if( !b_is_command )
-    {
-        msg_Warn( p_intf, "Module %s's %s variable isn't a command. You'll need to restart the filter to take change into account.",
-                 qtu( module ),
-                 qtu( option ) );
-        /* FIXME: restart automatically somewhere near the end of this function */
-    }
-
     /* Try to cast to all the widgets we're likely to encounter. Only
      * one of the casts is expected to work. */
     QSlider        *slider        = qobject_cast<QSlider*>       ( sender() );
@@ -637,6 +629,15 @@ void ExtVideo::updateFilterOptions()
                  qtu( option ),
                  i_type );
 
+    if( !b_is_command )
+    {
+        msg_Warn( p_intf, "Module %s's %s variable isn't a command. Brute-restarting the filter.",
+                 qtu( module ),
+                 qtu( option ) );
+        ChangeVFiltersString( p_intf, qtu( module ), false );
+        ChangeVFiltersString( p_intf, qtu( module ), true );
+    }
+
     if( p_obj ) vlc_object_release( p_obj );
 }
 



More information about the vlc-commits mailing list