fixed piano roll notes not playing glitch - pattern::rearrangeAllNotes failed to sort notes

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1852 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Andrew Kelley
2008-11-25 01:25:25 +00:00
parent 59544b109e
commit 103b4c8e7d
4 changed files with 31 additions and 9 deletions

View File

@@ -100,11 +100,13 @@ public:
void quantizeLength( const int _q_grid );
void quantizePos( const int _q_grid );
inline bool operator<(const note & rhs)
static inline bool lessThan(note * &lhs, note * &rhs)
{
return m_pos < rhs.pos();
// function to compare two notes - must be called explictly when
// using qSort
return (bool) ((int) ( *lhs ).pos() < (int) ( *rhs ).pos());
}
inline bool getSelected( void ) const
{
return m_selected;

View File

@@ -133,6 +133,10 @@ public:
using model::dataChanged;
void printNotes( void ); // for debugging purposes
protected: