only spray percussive hits during create drag if the grid is in use.
authornick_m <mainsbridge@gmail.com>
Sun, 20 Nov 2016 17:11:54 +0000 (04:11 +1100)
committernick_m <mainsbridge@gmail.com>
Sun, 20 Nov 2016 17:11:54 +0000 (04:11 +1100)
gtk2_ardour/editor_drag.cc

index 6a663daf9f93620f997c3f7569d4f68679165132..b6fa7fa4a69bc785886097382351639f3615ccfe 100644 (file)
@@ -6391,6 +6391,11 @@ PercussiveCreateDrag::motion (GdkEvent* event, bool)
 
        const framepos_t pf = _drags->current_pointer_frame ();
        const int32_t divisions = _editor->get_grid_music_divisions (event->button.state);
+
+       if (divisions == 0) {
+               return;
+       }
+
        const double eqaf = map.exact_qn_at_frame (pf, divisions);
        const framepos_t start = map.frame_at_quarter_note (eqaf) - _region_view->region()->position ();