Commit 0e8b7471 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt: fix rotation filter values

parent 08e4074a
......@@ -549,7 +549,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];
......@@ -564,7 +564,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 )
......@@ -683,8 +683,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 );
......
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