From 3c3bceccf91ce622dffdfe7042e88bfa8a798d2e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 5 Dec 2011 18:17:31 +0000 Subject: [PATCH] fix scroll wheel handling on both gain faders and parameter controls in automation track headers git-svn-id: svn://localhost/ardour2/branches/3.0@10903 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/automation_time_axis.cc | 2 ++ gtk2_ardour/time_axis_view.cc | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 379e8543b2..e172f40fc9 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -182,6 +182,8 @@ AutomationTimeAxisView::AutomationTimeAxisView ( if (_controller) { /* add bar controller */ controls_table.attach (*_controller.get(), 0, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND); + /* note that this handler connects *before* the default handler */ + _controller->event_widget().signal_scroll_event().connect (mem_fun (*this, &AutomationTimeAxisView::controls_ebox_scroll), false); } controls_table.show_all (); diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index b2a9653b4c..56dd2b746d 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -160,6 +160,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie Gdk::SCROLL_MASK); controls_ebox.set_flags (CAN_FOCUS); + /* note that this handler connects *before* the default handler */ controls_ebox.signal_scroll_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_scroll), true); controls_ebox.signal_button_press_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_press)); controls_ebox.signal_button_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_release)); @@ -319,10 +320,6 @@ TimeAxisView::clip_to_viewport () bool TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev) { - if (Keyboard::some_magic_widget_has_focus()) { - return false; - } - switch (ev->direction) { case GDK_SCROLL_UP: if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {