mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 12:46:32 +01:00
fix computation of note position for HitCreateDrags
This commit is contained in:
parent
7e75162840
commit
3600a6ffd0
1 changed files with 8 additions and 1 deletions
|
|
@ -6930,7 +6930,14 @@ HitCreateDrag::finished (GdkEvent* event, bool had_movement)
|
||||||
editing_context.snap_to (pos, RoundNearest, SnapToGrid_Scaled);
|
editing_context.snap_to (pos, RoundNearest, SnapToGrid_Scaled);
|
||||||
Temporal::Beats aligned_beats (pos.beats ());
|
Temporal::Beats aligned_beats (pos.beats ());
|
||||||
|
|
||||||
Beats const start = _midi_view->midi_region ()->absolute_time_to_source_beats (timepos_t (aligned_beats));
|
Beats start;
|
||||||
|
|
||||||
|
if (_midi_view->show_source()) {
|
||||||
|
Beats spos = _midi_view->midi_region()->source_position().beats() + aligned_beats;
|
||||||
|
start = _midi_view->midi_region ()->absolute_time_to_source_beats (timepos_t (spos));
|
||||||
|
} else {
|
||||||
|
start = _midi_view->midi_region ()->absolute_time_to_source_beats (timepos_t (aligned_beats));
|
||||||
|
}
|
||||||
|
|
||||||
/* Percussive hits are as short as possible */
|
/* Percussive hits are as short as possible */
|
||||||
Beats length (0, 1);
|
Beats length (0, 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue