stop using vertical adjustment to account for scrolling, since event coordinates...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 12 Apr 2013 16:53:52 +0000 (12:53 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 12 Apr 2013 16:53:52 +0000 (12:53 -0400)
gtk2_ardour/editor_mouse.cc

index e33da47d4f8e860a2ed6dc26c222155155f51ac5..276b4b583e6628f9b7f3d3ba2cce0ec9f15b09fc 100644 (file)
@@ -325,7 +325,7 @@ Editor::set_canvas_cursor ()
                                const ArdourCanvas::Item* i = items.front();
                                
                                if (i && i->parent() && i->parent()->get_data (X_("timeselection"))) {
-                                       pair<TimeAxisView*, int> tvp = trackview_by_y_position (_last_motion_y + vertical_adjustment.get_value());
+                                       pair<TimeAxisView*, int> tvp = trackview_by_y_position (_last_motion_y);
                                        if (dynamic_cast<AutomationTimeAxisView*> (tvp.first)) {
                                                current_canvas_cursor = _cursors->up_down;
                                        }
@@ -848,7 +848,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
                                /* grab selection for moving */
                                _drags->set (new SelectionDrag (this, item, SelectionDrag::SelectionMove), event);
                        } else {
-                               double const y = event->button.y + vertical_adjustment.get_value();
+                               double const y = event->button.y;
                                pair<TimeAxisView*, int> tvp = trackview_by_y_position (y);
                                if (tvp.first) {
                                        AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (tvp.first);
@@ -1100,7 +1100,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
                        {
                                if ( get_smart_mode() ) {
                                        /* we're in "smart" joined mode, and we've clicked on a Selection */
-                                       double const y = event->button.y + vertical_adjustment.get_value();
+                                       double const y = event->button.y;
                                        pair<TimeAxisView*, int> tvp = trackview_by_y_position (y);
                                        if (tvp.first) {
                                                /* if we're over an automation track, start a drag of its data */
@@ -2860,7 +2860,7 @@ Editor::update_join_object_range_location (double /*x*/, double y)
        }
 
        /* XXX: maybe we should make entered_track work in all cases, rather than resorting to this */
-       pair<TimeAxisView*, int> tvp = trackview_by_y_position (y + vertical_adjustment.get_value());
+       pair<TimeAxisView*, int> tvp = trackview_by_y_position (y);
 
        if (tvp.first) {