fix incorrect type; makes smooth knobs actually smooth

This commit is contained in:
Andrew Kelley
2014-01-25 23:03:48 -05:00
parent c2124fe1dd
commit 31c0f77248

View File

@@ -379,7 +379,7 @@ void knob::drawKnob( QPainter * _p )
float knob::getValue( const QPoint & _p )
{
const float SMOOTH_FACTOR = 0.125f;
int yDist = (_p.y() - m_origMousePos.y()) * SMOOTH_FACTOR;
float yDist = (_p.y() - m_origMousePos.y()) * SMOOTH_FACTOR;
if( engine::mainWindow()->isShiftPressed() )
{
return m_origValue - (yDist * model()->step<float>());