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).
This commit is contained in:
parent
2f72b42385
commit
a6b3c4048e
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user