From 332fa4747389778465c0e647a98b5dac8b558781 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 19 Dec 2006 14:37:28 +0000 Subject: [PATCH] fix behaviour of middle mouse button in a redirect box git-svn-id: svn://localhost/ardour2/trunk@1226 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/redirect_box.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc index 222d1b63cf..83875fa0e4 100644 --- a/gtk2_ardour/redirect_box.cc +++ b/gtk2_ardour/redirect_box.cc @@ -319,16 +319,16 @@ RedirectBox::redirect_button_release_event (GdkEventButton *ev) int celly; boost::shared_ptr redirect; int ret = false; - bool selected = false; + if (redirect_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) { if ((iter = model->get_iter (path))) { redirect = (*iter)[columns.redirect]; - selected = redirect_display.get_selection()->is_selected (iter); } - } + cerr << "button " << ev->button << " state " << ev->state << " redirect = " << redirect << endl; + if (redirect && Keyboard::is_delete_event (ev)) { cerr << " redirect clicked was " << redirect->name() << endl; @@ -341,7 +341,7 @@ RedirectBox::redirect_button_release_event (GdkEventButton *ev) show_redirect_menu(ev->time); ret = true; - } else if (redirect && ev->button == 2 && ev->state == 0) { + } else if (redirect && ev->button == 2 && ev->state == GDK_BUTTON2_MASK) { redirect->set_active (!redirect->active(), this); ret = true;