Commit aa306dc6 authored by Laurent Aimar's avatar Laurent Aimar

Fixed potential infinite loop between input/qt4 regarding input speed.

and fixes for sure duplicated input speed settings done by qt4 when
changing rate.
parent b51afca9
......@@ -503,6 +503,8 @@ SpeedControlWidget::SpeedControlWidget( intf_thread_t *_p_i, QWidget *_parent )
speedControlLayout->addWidget( speedSlider );
speedControlLayout->addWidget( normalSpeedButton );
lastValue = 0;
activateOnState();
}
......@@ -530,12 +532,16 @@ void SpeedControlWidget::updateControls( float rate )
{
sliderValue = speedSlider->maximum();
}
lastValue = sliderValue;
speedSlider->setValue( sliderValue );
}
void SpeedControlWidget::updateRate( int sliderValue )
{
if( sliderValue == lastValue )
return;
double speed = pow( 2, (double)sliderValue / 17 );
int rate = INPUT_RATE_DEFAULT / speed;
......
......@@ -189,6 +189,7 @@ public:
private:
intf_thread_t *p_intf;
QSlider *speedSlider;
int lastValue;
public slots:
void activateOnState();
......
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