summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas_events.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-06-12 17:21:23 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-12 17:21:23 -0400
commit720a9b73a592535e997bf4125347f2444a65bc5d (patch)
tree22acb0fb7bdac436123a42acca28777370b84c38 /gtk2_ardour/editor_canvas_events.cc
parent695840918716a679be6ca41a956d5d93cb583271 (diff)
fixed rulers stealing all canvas scroll events and corrected computation of correct track for track-height adjustment using alt-scroll
Diffstat (limited to 'gtk2_ardour/editor_canvas_events.cc')
-rw-r--r--gtk2_ardour/editor_canvas_events.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc
index f8fb2f3511..a9114df5dd 100644
--- a/gtk2_ardour/editor_canvas_events.cc
+++ b/gtk2_ardour/editor_canvas_events.cc
@@ -89,7 +89,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomVerticalModifier)) {
if (!current_stepping_trackview) {
step_timeout = Glib::signal_timeout().connect (sigc::mem_fun(*this, &Editor::track_height_step_timeout), 500);
- std::pair<TimeAxisView*, int> const p = trackview_by_y_position (event_coords.y);
+ std::pair<TimeAxisView*, int> const p = trackview_by_y_position (event_coords.y, false);
current_stepping_trackview = p.first;
if (!current_stepping_trackview) {
return false;
@@ -118,7 +118,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomVerticalModifier)) {
if (!current_stepping_trackview) {
step_timeout = Glib::signal_timeout().connect (sigc::mem_fun(*this, &Editor::track_height_step_timeout), 500);
- std::pair<TimeAxisView*, int> const p = trackview_by_y_position (event_coords.y);
+ std::pair<TimeAxisView*, int> const p = trackview_by_y_position (event_coords.y, false);
current_stepping_trackview = p.first;
if (!current_stepping_trackview) {
return false;
@@ -162,7 +162,8 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
bool
Editor::canvas_scroll_event (GdkEventScroll *event)
{
- if (h_scroll_group->covers (Duple (event->x, event->y))) {
+ boost::optional<Rect> rulers = _time_markers_group->bounding_box();
+ if (rulers && rulers->contains (Duple (event->x, event->y))) {
return canvas_ruler_event ((GdkEvent*) event, timecode_ruler, TimecodeRulerItem);
}