diff options
author | nick_m <mainsbridge@gmail.com> | 2016-10-09 23:40:54 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-10-09 23:40:54 +1100 |
commit | a6b3c4048e76369ec2e12c315dac91ad713444c7 (patch) | |
tree | 45e635dc34efaa899e89136831e17f2adefddeec /libs/ardour/midi_region.cc | |
parent | 2f72b4238544261fbb40e17189706d3fcdd52b7d (diff) |
Ensure midi region start trim always sets _start_beats.
- Property::set() requires that new_val != current for a change
to occur, but Beats::operator!= has tick resolution.
i think this is pretty good evidence that _start/_length_beats
should actually be double rather than Evoral::Beats
(adjusting a region by increments of less than a tick
is desirable).
Diffstat (limited to 'libs/ardour/midi_region.cc')
-rw-r--r-- | libs/ardour/midi_region.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index fee10e292c..d4cf35e82a 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -637,8 +637,8 @@ MidiRegion::trim_to_internal (framepos_t position, framecnt_t length, const int3 return; } - /* at small deltas, (high zooms) the property will not change without this. tick rounding?*/ - _start_beats = Evoral::Beats(); + /* at small deltas, (high zooms) the property will not change without this (tick resolution of Beats::operator!=)*/ + _start_beats += Evoral::Beats (new_start_qn) + start_beats().tick() * 2.0; _start_beats = Evoral::Beats (new_start_qn); what_changed.add (Properties::start_beats); |