[vlc-commits] Qt: fix rotation filter values
Rémi Denis-Courmont
git at videolan.org
Wed Apr 1 12:47:56 CEST 2015
vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar 30 21:46:05 2015 +0300| [ff2855d5955ce0b4c26fdb2c924ef8120cad7f95] | committer: Jean-Baptiste Kempf
Qt: fix rotation filter values
(cherry picked from commit 0e8b7471fe0249c59a9e02e556a5df8dad0b224f)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ff2855d5955ce0b4c26fdb2c924ef8120cad7f95
---
modules/gui/qt4/components/extended_panels.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 4ee8eed..00c0cdb 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -548,7 +548,7 @@ void ExtVideo::setWidgetValue( QObject *widget )
else if( checkbox ) checkbox->setCheckState( val.i_int? Qt::Checked
: Qt::Unchecked );
else if( spinbox ) spinbox->setValue( val.i_int );
- else if( dial ) dial->setValue( ( 540-val.i_int )%360 );
+ else if( dial ) dial->setValue( (360 - val.i_int) % 360 );
else if( lineedit )
{
char str[30];
@@ -563,7 +563,7 @@ void ExtVideo::setWidgetValue( QObject *widget )
{
if( slider ) slider->setValue( ( int )( val.f_float*( double )slider->tickInterval() ) ); /* hack alert! */
else if( doublespinbox ) doublespinbox->setValue( val.f_float );
- else if( dial ) dial->setValue( (540 - lroundf(val.f_float)) % 360 );
+ else if( dial ) dial->setValue( (360 - lroundf(val.f_float)) % 360 );
else msg_Warn( p_intf, "Could not find the correct Float widget" );
}
else if( i_type == VLC_VAR_STRING )
@@ -682,8 +682,8 @@ void ExtVideo::updateFilterOptions()
else if( spinbox ) i_int = spinbox->value();
else if( doublespinbox ) f_float = doublespinbox->value();
else if( dial ) {
- i_int = (540 - dial->value()) % 360;
- f_float = (540 - dial->value()) / 360.;
+ i_int = (360 - dial->value()) % 360;
+ f_float = i_int;
}
else if( lineedit ) {
i_int = lineedit->text().toInt( NULL,16 );
More information about the vlc-commits
mailing list