From e28eaa843d050afdb478bbfc2f21f92ea7ac0429 Mon Sep 17 00:00:00 2001 From: darless <3382617+darless@users.noreply.github.com> Date: Fri, 21 Jul 2023 15:13:34 -0500 Subject: [PATCH] Fix #8857: Remove snap from decision making about number of divisions --- gtk2_ardour/editor.cc | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 2c2a4e8f16..05ec3b58f6 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -4383,22 +4383,15 @@ Editor::get_grid_beat_divisions (GridType gt) return 0; } -/** returns the current musical grid divisiions using the supplied modifier mask from a GtkEvent. - if the grid is non-musical, returns 0. - if the grid is snapped to bars, returns -1. - @param event_state the current keyboard modifier mask. -*/ +/** + * Return the musical grid divisions + * + * @param event_state the current keyboard modifier mask. + * @return Music grid beat divisions + */ int32_t Editor::get_grid_music_divisions (Editing::GridType gt, uint32_t event_state) { - if (snap_mode() == SnapOff && !ArdourKeyboard::indicates_snap (event_state)) { - return 0; - } - - if (snap_mode() != SnapOff && ArdourKeyboard::indicates_snap (event_state)) { - return 0; - } - return get_grid_beat_divisions (gt); }