Keep timeline loop points from being equal

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1603 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-09-13 16:56:37 +00:00
parent b217bbdfd8
commit 5b449171d1
2 changed files with 16 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2008-09-08 Paul Giblock <drfaygo/at/gmail/dot/com>
* src/core/timeline.cpp:
Keep loop markers from being in same position
2008-09-11 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* include/audio_port.h:

View File

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