From 9fa8e257a6c022e91fb64a80476a0d85d22b91be Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Wed, 17 May 2023 09:01:05 -0500 Subject: [PATCH] tempo mapping: Mapping Drags should inhibit horizontal autoscroll --- gtk2_ardour/editor_drag.cc | 2 +- gtk2_ardour/editor_drag.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 53fd5d33cc..db63522c28 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -518,7 +518,7 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll) } if (!from_autoscroll) { - _editor->maybe_autoscroll (true, allow_vertical_autoscroll (), false); + _editor->maybe_autoscroll (allow_horizontal_autoscroll (), allow_vertical_autoscroll (), false); } if (!_editor->autoscroll_active() || from_autoscroll) { diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 7fe7fe4819..dc567d3adf 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -220,6 +220,10 @@ public: return true; } + virtual bool allow_horizontal_autoscroll () const { + return true; + } + /** @return true if x movement matters to this drag */ virtual bool x_movement_matters () const { return true; @@ -926,6 +930,10 @@ public: return false; } + bool allow_horizontal_autoscroll () const { + return false; + } + bool y_movement_matters () const { return false; } @@ -960,6 +968,10 @@ public: return false; } + bool allow_horizontal_autoscroll () const { + return false; + } + bool y_movement_matters () const { return false; }