[vlc-devel] commit: fix qt crop synchronisation (Dylan Yudaken )

git version control git at videolan.org
Wed Apr 29 11:01:22 CEST 2009


vlc | branch: master | Dylan Yudaken <dyudaken at gmail.com> | Tue Apr 28 13:15:38 2009 +0200| [569095f047671a1651efa541fb0ede87cc80392b] | committer: Jean-Baptiste Kempf 

fix qt crop synchronisation

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt4/components/extended_panels.cpp |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index be03990..464c27f 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -212,6 +212,8 @@ ExtVideo::ExtVideo( intf_thread_t *_p_intf, QTabWidget *_parent ) :
     CONNECT( ui.cropBotPx, valueChanged( int ), this, cropChange() );
     CONNECT( ui.cropLeftPx, valueChanged( int ), this, cropChange() );
     CONNECT( ui.cropRightPx, valueChanged( int ), this, cropChange() );
+    CONNECT( ui.leftRightCropSync, toggled ( bool ), this, cropChange() );
+    CONNECT( ui.topBotCropSync, toggled ( bool ), this, cropChange() );
     CONNECT( ui.topBotCropSync, toggled( bool ),
              ui.cropBotPx, setDisabled( bool ) );
     CONNECT( ui.leftRightCropSync, toggled( bool ),
@@ -224,6 +226,11 @@ ExtVideo::~ExtVideo()
 
 void ExtVideo::cropChange()
 {
+    if( ui.topBotCropSync->isChecked() )
+        ui.cropBotPx->setValue( ui.cropTopPx->value() );
+    if( ui.leftRightCropSync->isChecked() )
+        ui.cropRightPx->setValue( ui.cropLeftPx->value() );
+
     p_vout = THEMIM->getVout();
     if( p_vout )
     {




More information about the vlc-devel mailing list