From 60fa99a34de1e59f34d03989f10ded80c861fa06 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 5 Dec 2011 20:47:53 +0000 Subject: Remove hopelessly inadequate attempt at last_item_entered and ask the canvas where we are instead. Should fix #4532. git-svn-id: svn://localhost/ardour2/branches/3.0@10907 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_mouse.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gtk2_ardour/editor_mouse.cc') diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index b47934554c..3d61089d9a 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -302,8 +302,11 @@ Editor::set_canvas_cursor () } /* up-down cursor as a cue that automation can be dragged up and down when in join object/range mode */ - if (join_object_range_button.get_active() && last_item_entered) { - if (last_item_entered->property_parent() && (*last_item_entered->property_parent()).get_data (X_("timeselection"))) { + if (join_object_range_button.get_active()) { + double x, y; + get_pointer_position (x, y); + ArdourCanvas::Item* i = track_canvas->get_item_at (x, y); + if (i && i->property_parent() && (*i->property_parent()).get_data (X_("timeselection"))) { pair tvp = trackview_by_y_position (_last_motion_y + vertical_adjustment.get_value() - canvas_timebars_vsize); if (dynamic_cast (tvp.first)) { current_canvas_cursor = _cursors->up_down; @@ -1590,8 +1593,6 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_ double fraction; bool ret = true; - last_item_entered = item; - switch (item_type) { case ControlPointItem: if (mouse_mode == MouseGain || mouse_mode == MouseObject) { -- cgit v1.2.3