Pattern: properly advance iterator when removing notes

We must not keep the iterator at the same position when erasing notes
from the m_notes array. This usually is not a problem when using QVector
but we might switch to QList somewhen later.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
Tobias Doerffel
2009-06-18 23:05:14 +02:00
parent 0d6ba6291b
commit 2d5dfc7b15

View File

@@ -611,7 +611,7 @@ void pattern::changeTimeSignature( void )
if( ( *it )->length() == 0 && ( *it )->pos() >= last_pos )
{
delete *it;
m_notes.erase( it );
it = m_notes.erase( it );
--m_steps;
}
else