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:
Ben Loftis 2022-05-11 11:45:33 -05:00
parent a60dfc19d2
commit 83d0892777
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}

View File

@ -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 */