From cacc3881ec57556270108dd17a845ac2f293ca35 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 27 May 2024 10:39:09 -0600 Subject: [PATCH] fix confusion between track renaming and track dragging --- gtk2_ardour/time_axis_view.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index ccb7fbedd8..9ae1aade6e 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -411,20 +411,26 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev) bool TimeAxisView::controls_ebox_button_press (GdkEventButton* event) { - if ((event->button == 1 && event->type == GDK_2BUTTON_PRESS) || Keyboard::is_edit_event (event)) { + if (event->button == 1) { /* see if it is inside the name label */ if (name_label.is_ancestor (controls_ebox)) { + int nlx; int nly; controls_ebox.translate_coordinates (name_label, event->x, event->y, nlx, nly); Gtk::Allocation a = name_label.get_allocation (); + if (nlx > 0 && nlx < a.get_width() && nly > 0 && nly < a.get_height()) { - begin_name_edit (); - _ebox_release_can_act = false; - return true; + + if ((event->type == GDK_2BUTTON_PRESS) || Keyboard::is_edit_event (event)) { + begin_name_edit (); + _ebox_release_can_act = false; + return true; + } else { + return true; + } } } - } if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) {