Skip to content

Commit

Permalink
Fix automation cursor position issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed Nov 4, 2014
1 parent 6c9b87f commit 1826ced
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/MidiTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ class EXPORT MidiTime
return getTact() * s_ticksPerTact;
}

MidiTime toAbsoluteTact() const
{
return getTact() * s_ticksPerTact;
}

MidiTime& operator=( const MidiTime& time )
{
m_ticks = time.m_ticks;
Expand Down
2 changes: 1 addition & 1 deletion src/tracks/AutomationTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void AutomationTrackView::dropEvent( QDropEvent * _de )
getTrackContentWidget()->x() ) *
MidiTime::ticksPerTact() /
static_cast<int>( trackContainerView()->pixelsPerTact() ) )
.toNearestTact();
.toAbsoluteTact();

if( pos.getTicks() < 0 )
{
Expand Down

0 comments on commit 1826ced

Please sign in to comment.