Merge pull request #1307 from diizy/model

Add a method to AutomatableModel that allows tracking changes without using signals/slots
This commit is contained in:
Vesa V
2014-11-16 14:54:38 +02:00
6 changed files with 65 additions and 42 deletions

View File

@@ -47,6 +47,7 @@ AutomatableModel::AutomatableModel( DataType type,
m_step( step ),
m_range( max - min ),
m_centerValue( m_minValue ),
m_valueChanged( false ),
m_setValueDepth( 0 ),
m_hasLinkedModels( false ),
m_controllerConnection( NULL )
@@ -234,6 +235,7 @@ void AutomatableModel::setValue( const float value )
(*it)->setJournalling( journalling );
}
}
m_valueChanged = true;
emit dataChanged();
}
else
@@ -327,6 +329,7 @@ void AutomatableModel::setAutomatedValue( const float value )
(*it)->setAutomatedValue( value );
}
}
m_valueChanged = true;
emit dataChanged();
}
--m_setValueDepth;
@@ -471,6 +474,7 @@ void AutomatableModel::setControllerConnection( ControllerConnection* c )
{
QObject::connect( m_controllerConnection, SIGNAL( valueChanged() ), this, SIGNAL( dataChanged() ) );
QObject::connect( m_controllerConnection, SIGNAL( destroyed() ), this, SLOT( unlinkControllerConnection() ) );
m_valueChanged = true;
emit dataChanged();
}
}