when drawing notes, the grid should be scaled to the zoom scale
this prevents the case where have enabled snap, and you add a note that appears to be on a bar line. but actually it is {some Grid value} off, it just looks right because of pixel rounding.
This commit is contained in:
parent
a60dfc19d2
commit
83d0892777
@ -6840,7 +6840,7 @@ Temporal::Beats
|
||||
NoteCreateDrag::round_down_to_grid (timepos_t const & pos, GdkEvent const * event) const
|
||||
{
|
||||
timepos_t snapped = pos;
|
||||
_editor->snap_to (snapped, RoundDownMaybe, SnapToGrid_Unscaled);
|
||||
_editor->snap_to (snapped, RoundDownMaybe, SnapToGrid_Scaled);
|
||||
return snapped.beats();
|
||||
}
|
||||
|
||||
|
@ -4093,7 +4093,7 @@ MidiRegionView::update_ghost_note (double x, double y, uint32_t state)
|
||||
|
||||
samplepos_t const unsnapped_sample = editor.pixel_to_sample (global_x);
|
||||
Temporal::timepos_t snapped_pos = timepos_t (unsnapped_sample);
|
||||
editor.snap_to (snapped_pos, RoundDownAlways, SnapToGrid_Unscaled);
|
||||
editor.snap_to (snapped_pos, RoundDownAlways, SnapToGrid_Scaled);
|
||||
const Temporal::Beats snapped_beats = _region->position().distance (snapped_pos).beats ();
|
||||
|
||||
/* prevent Percussive mode from displaying a ghost hit at region end */
|
||||
|
Loading…
Reference in New Issue
Block a user