Remove controller connection when no controller is set

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1044 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-06-02 07:59:54 +00:00
parent 5f6d0af98d
commit 38a6278619
5 changed files with 31 additions and 7 deletions

View File

@@ -117,9 +117,12 @@ public:
inline void setControllerConnection( controllerConnection * _c )
{
m_controllerConnection = _c;
QObject::connect( m_controllerConnection,
SIGNAL( valueChanged() ),
this, SIGNAL( dataChanged() ) );
if( _c )
{
QObject::connect( m_controllerConnection,
SIGNAL( valueChanged() ),
this, SIGNAL( dataChanged() ) );
}
}

View File

@@ -56,7 +56,7 @@ public:
return m_controller;
}
inline void setController( controller * _controller );
void setController( controller * _controller );
inline void setController( int _controllerId );