fixed loops when adding a controller to a model which is linked to another model

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1828 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-11-04 11:50:52 +00:00
parent 02818a14ee
commit d5a9092c9b
3 changed files with 57 additions and 29 deletions

View File

@@ -119,7 +119,8 @@ public:
template<class T>
inline T value( int _frameOffset = 0 ) const
{
if( unlikely( m_controllerConnection != NULL ) )
if( unlikely( m_hasLinkedModels ||
m_controllerConnection != NULL ) )
{
return castValue<T>( controllerValue( _frameOffset ) );
}
@@ -243,8 +244,10 @@ private:
// standard)
float m_oldValue;
bool m_journalEntryReady;
int m_setValueDepth;
autoModelVector m_linkedModels;
bool m_hasLinkedModels;
controllerConnection * m_controllerConnection;