Fixed bugs with magnetic knobs
The problem comes from AutomatableModel::m_initValue wich is not fitted either in constructor or in setter. Idem for m_value in constructor, imo this is not enough consistent. I propose to: - call fittedValue() in init value setter. - always call setter to initialize current & init values.
This commit is contained in:
committed by
Tobias Doerffel
parent
5d5189b1f4
commit
0b057ec5df
@@ -44,8 +44,6 @@ AutomatableModel::AutomatableModel( DataType _type,
|
||||
bool _default_constructed ) :
|
||||
Model( _parent, _display_name, _default_constructed ),
|
||||
m_dataType( _type ),
|
||||
m_value( _val ),
|
||||
m_initValue( _val ),
|
||||
m_minValue( _min ),
|
||||
m_maxValue( _max ),
|
||||
m_step( _step ),
|
||||
@@ -55,6 +53,7 @@ AutomatableModel::AutomatableModel( DataType _type,
|
||||
m_hasLinkedModels( false ),
|
||||
m_controllerConnection( NULL )
|
||||
{
|
||||
setInitValue( _val );
|
||||
}
|
||||
|
||||
|
||||
@@ -473,7 +472,7 @@ void AutomatableModel::unlinkControllerConnection()
|
||||
|
||||
void AutomatableModel::setInitValue( const float _value )
|
||||
{
|
||||
m_initValue = _value;
|
||||
m_initValue = fittedValue( _value );
|
||||
bool journalling = testAndSetJournalling( false );
|
||||
setValue( _value );
|
||||
setJournalling( journalling );
|
||||
|
||||
Reference in New Issue
Block a user