Commit ff2855d5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Jean-Baptiste Kempf

Qt: fix rotation filter values

(cherry picked from commit 0e8b7471fe0249c59a9e02e556a5df8dad0b224f)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3d9e2978
...@@ -548,7 +548,7 @@ void ExtVideo::setWidgetValue( QObject *widget ) ...@@ -548,7 +548,7 @@ void ExtVideo::setWidgetValue( QObject *widget )
else if( checkbox ) checkbox->setCheckState( val.i_int? Qt::Checked else if( checkbox ) checkbox->setCheckState( val.i_int? Qt::Checked
: Qt::Unchecked ); : Qt::Unchecked );
else if( spinbox ) spinbox->setValue( val.i_int ); 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 ) else if( lineedit )
{ {
char str[30]; char str[30];
...@@ -563,7 +563,7 @@ void ExtVideo::setWidgetValue( QObject *widget ) ...@@ -563,7 +563,7 @@ void ExtVideo::setWidgetValue( QObject *widget )
{ {
if( slider ) slider->setValue( ( int )( val.f_float*( double )slider->tickInterval() ) ); /* hack alert! */ if( slider ) slider->setValue( ( int )( val.f_float*( double )slider->tickInterval() ) ); /* hack alert! */
else if( doublespinbox ) doublespinbox->setValue( val.f_float ); 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 msg_Warn( p_intf, "Could not find the correct Float widget" );
} }
else if( i_type == VLC_VAR_STRING ) else if( i_type == VLC_VAR_STRING )
...@@ -682,8 +682,8 @@ void ExtVideo::updateFilterOptions() ...@@ -682,8 +682,8 @@ void ExtVideo::updateFilterOptions()
else if( spinbox ) i_int = spinbox->value(); else if( spinbox ) i_int = spinbox->value();
else if( doublespinbox ) f_float = doublespinbox->value(); else if( doublespinbox ) f_float = doublespinbox->value();
else if( dial ) { else if( dial ) {
i_int = (540 - dial->value()) % 360; i_int = (360 - dial->value()) % 360;
f_float = (540 - dial->value()) / 360.; f_float = i_int;
} }
else if( lineedit ) { else if( lineedit ) {
i_int = lineedit->text().toInt( NULL,16 ); i_int = lineedit->text().toInt( NULL,16 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment