added empty() to check whether there is any relevant note
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@348 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -159,6 +159,8 @@ public:
|
||||
return( m_instrumentTrack );
|
||||
}
|
||||
|
||||
bool empty( void );
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void update( void );
|
||||
|
||||
@@ -1180,6 +1180,22 @@ void pattern::updateBBTrack( void )
|
||||
|
||||
|
||||
|
||||
bool pattern::empty( void )
|
||||
{
|
||||
for( noteVector::iterator it = m_notes.begin(); it != m_notes.end();
|
||||
++it )
|
||||
{
|
||||
if( ( *it )->length() != 0 )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user