Drop forceStep in AutomatableModel (#3010)

This commit is contained in:
Javier Serrano Polo
2016-08-30 17:45:09 +00:00
committed by Lukas W
parent 8c2f98a89e
commit f14cb687de
2 changed files with 4 additions and 4 deletions

View File

@@ -297,7 +297,7 @@ protected:
//! max() and aligned according to the step size (step size 0.05 -> value
//! 0.12345 becomes 0.10 etc.). You should always call it at the end after
//! doing your own calculations.
float fittedValue( float value, bool forceStep = false ) const;
float fittedValue( float value ) const;
private:

View File

@@ -377,11 +377,11 @@ void AutomatableModel::setStep( const float step )
float AutomatableModel::fittedValue( float value, bool forceStep ) const
float AutomatableModel::fittedValue( float value ) const
{
value = tLimit<float>( value, m_minValue, m_maxValue );
if( m_step != 0 && ( m_hasStrictStepSize || forceStep ) )
if( m_step != 0 && m_hasStrictStepSize )
{
value = nearbyintf( value / m_step ) * m_step;
}
@@ -583,7 +583,7 @@ ValueBuffer * AutomatableModel::valueBuffer()
float * nvalues = m_valueBuffer.values();
for( int i = 0; i < vb->length(); i++ )
{
nvalues[i] = fittedValue( values[i], false );
nvalues[i] = fittedValue( values[i] );
}
m_lastUpdatedPeriod = s_periodCounter;
m_hasSampleExactData = true;