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:
Javier Serrano Polo
2006-08-18 21:18:29 +00:00
parent d3610ddd03
commit 41181af213
2 changed files with 18 additions and 0 deletions

View File

@@ -159,6 +159,8 @@ public:
return( m_instrumentTrack );
}
bool empty( void );
public slots:
virtual void update( void );

View File

@@ -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 );
}