From d6314e3253b88d0b53a59f4f593520b3e2ff963e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 30 Dec 2010 20:17:44 +0000 Subject: add back MIDI Learn for stereo panner git-svn-id: svn://localhost/ardour2/branches/3.0@8394 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/stereo_panner.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gtk2_ardour/stereo_panner.cc') diff --git a/gtk2_ardour/stereo_panner.cc b/gtk2_ardour/stereo_panner.cc index 86cb794f7b..7ab526f8fa 100644 --- a/gtk2_ardour/stereo_panner.cc +++ b/gtk2_ardour/stereo_panner.cc @@ -67,6 +67,8 @@ StereoPanner::StereoPanner (boost::shared_ptr position, boost , detented (false) , drag_data_window (0) , drag_data_label (0) + , position_binder (position) + , width_binder (width) { if (!have_colors) { set_colors (); @@ -294,6 +296,19 @@ StereoPanner::on_button_press_event (GdkEventButton* ev) accumulated_delta = 0; detented = false; + /* Let the binding proxies get first crack at the press event + */ + + if (ev->y < 20) { + if (position_binder.button_press_handler (ev)) { + return true; + } + } else { + if (width_binder.button_press_handler (ev)) { + return true; + } + } + if (ev->button != 1) { return false; } -- cgit v1.2.3