diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-12-19 15:42:42 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-12-19 15:42:42 +0000 |
commit | 434f3e6296f3b31bd6cca588f97f14c94c3af119 (patch) | |
tree | 47b5d7db960cbb0c0948a6cf36bed48f5baad266 /gtk2_ardour/time_axis_view.cc | |
parent | 8adae13ad3615c0e63129fa96d72102dae91b882 (diff) |
make shift-scrollwheel work in any TimeAxisView
git-svn-id: svn://localhost/ardour2/trunk@1230 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 17a011baa7..2909fa46e9 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -1067,3 +1067,25 @@ TimeAxisView::color_handler (ColorID id, uint32_t val) break; } } + +TimeAxisView* +TimeAxisView::covers_y_position (double y) +{ + if (hidden()) { + return 0; + } + + if (y_position <= y && y < (y_position + height)) { + return this; + } + + for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) { + TimeAxisView* tv; + + if ((tv = (*i)->covers_y_position (y)) != 0) { + return tv; + } + } + + return 0; +} |