diff --git a/ChangeLog b/ChangeLog index 94e4e5d4f..3a83248f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-08 Paul Giblock + + * src/core/timeline.cpp: + Keep loop markers from being in same position + 2008-09-11 Tobias Doerffel * include/audio_port.h: diff --git a/src/core/timeline.cpp b/src/core/timeline.cpp index 6d8c052e7..5633ab4f3 100644 --- a/src/core/timeline.cpp +++ b/src/core/timeline.cpp @@ -350,6 +350,17 @@ void timeLine::mouseMoveEvent( QMouseEvent * _me ) { m_loopPos[i] = t.toNearestTact(); } + // Catch begin == end + if( m_loopPos[0] == m_loopPos[1] ) + { + // Note, swap 1 and 0 below and the behavior "skips" the other + // marking instead of pushing it. However, I think pushing the + // other marker makes more sense it keeps the markers in order + if( m_action == MoveLoopBegin ) + m_loopPos[1] += midiTime::ticksPerTact(); + else + m_loopPos[0] -= midiTime::ticksPerTact(); + } update(); break; }