AutomatableModel: always fit value from linked model

When using value from linked model, make sure to fit it into own range
as otherwise this can cause out-of-boundary accesses e.g. in ComboBoxModel.

Closes #505.
This commit is contained in:
Tobias Doerffel
2014-03-24 19:18:14 +01:00
parent 02219d908c
commit 2ab5b1da0c

View File

@@ -445,10 +445,10 @@ float AutomatableModel::controllerValue( int frameOffset ) const
AutomatableModel* lm = m_linkedModels.first();
if( lm->controllerConnection() )
{
return lm->controllerValue( frameOffset );
return fittedValue( lm->controllerValue( frameOffset ) );
}
return lm->m_value;
return fittedValue( lm->m_value );
}