remove scroll wheel editing nonsense (tempo)
authornick_m <mainsbridge@gmail.com>
Mon, 27 Feb 2017 02:44:23 +0000 (13:44 +1100)
committerRobin Gareus <robin@gareus.org>
Mon, 27 Feb 2017 19:16:10 +0000 (20:16 +0100)
gtk2_ardour/editor_canvas_events.cc

index af5b8a9241aa4d8a4988f8b29aa7efa372fcfa96..89a8bc6b93fcab3734bb3785fb5f8384d3568f5f 100644 (file)
@@ -1008,57 +1008,6 @@ Editor::canvas_videotl_bar_event (GdkEvent *event, ArdourCanvas::Item* item)
 bool
 Editor::canvas_tempo_marker_event (GdkEvent *event, ArdourCanvas::Item* item, TempoMarker* marker)
 {
-
-       if (event->type == GDK_SCROLL) {
-
-               TempoMap& tmap (session()->tempo_map());
-               bool handled = false;
-               double ntpm_adjust = 2.0;
-               XMLNode* before_state = &tmap.get_state();
-
-               if (ArdourKeyboard::modifier_state_contains (event->scroll.state, ArdourKeyboard::fine_adjust_modifier())) {
-                       ntpm_adjust /= 10.0;
-               }
-
-               switch (event->scroll.direction) {
-
-               case GDK_SCROLL_UP:
-
-                       if (ArdourKeyboard::indicates_copy (event->scroll.state) && ArdourKeyboard::indicates_constraint (event->scroll.state)) {
-                               tmap.gui_change_tempo (&marker->tempo(), marker->tempo().note_types_per_minute() + ntpm_adjust, false);
-                               handled = true;
-                       } else if (ArdourKeyboard::indicates_copy (event->scroll.state)) {
-                               tmap.gui_change_tempo (&marker->tempo(), marker->tempo().end_note_types_per_minute() + ntpm_adjust,true);
-                               handled = true;
-                       }
-
-                       break;
-
-               case GDK_SCROLL_DOWN:
-
-                       if (ArdourKeyboard::indicates_copy (event->scroll.state) && ArdourKeyboard::indicates_constraint (event->scroll.state)) {
-                               tmap.gui_change_tempo (&marker->tempo(), marker->tempo().note_types_per_minute() - ntpm_adjust, false);
-                               handled = true;
-                       } else if (ArdourKeyboard::indicates_copy (event->scroll.state)) {
-                               tmap.gui_change_tempo (&marker->tempo(), marker->tempo().end_note_types_per_minute() - ntpm_adjust, true);
-                               handled = true;
-                       }
-
-                       break;
-
-               default:
-                       break;
-               }
-
-               if (handled) {
-                       begin_reversible_command (_("Change Tempo"));
-                       session()->add_command (new MementoCommand<TempoMap>(tmap, before_state, &tmap.get_state()));
-                       commit_reversible_command ();
-               }
-
-               return handled;
-       }
-
        return typed_event (item, event, TempoMarkerItem);
 }