Commit 846444ce authored by Erwan Tulou's avatar Erwan Tulou

skins2: fix RadialSlider (overflow)

position varies between 0 and (n-1) when n images are available.
This fixes the widget disappearing when slider was at 100%.
(cherry picked from commit 35bbdac8)
parent c34a9f9f
......@@ -100,7 +100,7 @@ void CtrlRadialSlider::draw( OSGraphics &rImage, int xDest, int yDest )
void CtrlRadialSlider::onUpdate( Subject<VarPercent> &rVariable,
void *arg )
{
m_position = (int)( m_rVariable.get() * m_numImg );
m_position = (int)( m_rVariable.get() * ( m_numImg - 1 ) );
notifyLayout( m_width, m_height );
}
......
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