fixed loops when adding a controller to a model which is linked to another model (stable backport)

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1829 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-11-04 11:51:21 +00:00
parent 92789f843e
commit 062b615bd1
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;