summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mouse.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-05 20:47:53 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-05 20:47:53 +0000
commit60fa99a34de1e59f34d03989f10ded80c861fa06 (patch)
treec119134b2b799c178943a7bf841904edeb34a743 /gtk2_ardour/editor_mouse.cc
parentc44e520d8ca1c4efe6af36d08cd3f86f12f712c2 (diff)
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
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r--gtk2_ardour/editor_mouse.cc9
1 files changed, 5 insertions, 4 deletions
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<TimeAxisView*, int> tvp = trackview_by_y_position (_last_motion_y + vertical_adjustment.get_value() - canvas_timebars_vsize);
if (dynamic_cast<AutomationTimeAxisView*> (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) {