summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-06-09 10:02:38 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-09 10:02:38 -0400
commitd36afa6b8bb3815d91e0fe93887a83e4a873f157 (patch)
tree9df715b20721ea3f0d005b0bfccd05ed611c63ef /gtk2_ardour/time_axis_view.cc
parent95f2b4ba17949ef5d70bc973665e1b9c29f38e4d (diff)
forward scroll events from track control headers to the canvas, to get consistent scroll behaviour (whatever that behaviour is)
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r--gtk2_ardour/time_axis_view.cc43
1 files changed, 7 insertions, 36 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index e36b78daaf..059776bd92 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -287,43 +287,14 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
bool
TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
{
- switch (ev->direction) {
- case GDK_SCROLL_UP:
- if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomVerticalModifier)) {
- /* See Editor::_stepping_axis_view for notes on this hack */
- Editor& e = dynamic_cast<Editor&> (_editor);
- if (!e.stepping_axis_view ()) {
- e.set_stepping_axis_view (this);
- }
- e.stepping_axis_view()->step_height (false);
- return true;
- } else if (Keyboard::no_modifiers_active (ev->state)) {
- _editor.scroll_up_one_track();
- return true;
- }
- break;
+ /* Just forward to the normal canvas scroll method. The coordinate
+ systems are different but since the canvas is always larger than the
+ track headers, and aligned with the trackview area, this will work.
- case GDK_SCROLL_DOWN:
- if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomVerticalModifier)) {
- /* See Editor::_stepping_axis_view for notes on this hack */
- Editor& e = dynamic_cast<Editor&> (_editor);
- if (!e.stepping_axis_view ()) {
- e.set_stepping_axis_view (this);
- }
- e.stepping_axis_view()->step_height (true);
- return true;
- } else if (Keyboard::no_modifiers_active (ev->state)) {
- _editor.scroll_down_one_track();
- return true;
- }
- break;
-
- default:
- /* no handling for left/right, yet */
- break;
- }
-
- return false;
+ In the not too distant future this layout is going away anyway and
+ headers will be on the canvas.
+ */
+ return _editor.canvas_scroll_event (ev);
}
bool