diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-05-21 10:25:28 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-03 16:10:27 -0400 |
commit | c9f890bd7c3377d86030e98f002d85acd66f0997 (patch) | |
tree | 990b4006f30e4f5c08caf75d54c6bb8509a59e86 /gtk2_ardour | |
parent | a5511818422c13ebc6f98cccf0996f821985cc67 (diff) |
avoid recursing through the entire canvas when scrolling - only scroll explicitly identified ScrollGroups
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 0c08af5c11..eaf9c25598 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -66,12 +66,14 @@ Editor::initialize_canvas () { _track_canvas_viewport = new ArdourCanvas::GtkCanvasViewport (horizontal_adjustment, vertical_adjustment); _track_canvas = _track_canvas_viewport->canvas (); - _track_canvas->set_global_scroll (false); - hv_scroll_group = new ArdourCanvas::ScrollGroup (_track_canvas->root(), - ArdourCanvas::ScrollGroup::ScrollSensitivity (ArdourCanvas::ScrollGroup::ScrollsVertically| - ArdourCanvas::ScrollGroup::ScrollsHorizontally)); + ArdourCanvas::ScrollGroup* hsg; + + hv_scroll_group = hsg = new ArdourCanvas::ScrollGroup (_track_canvas->root(), + ArdourCanvas::ScrollGroup::ScrollSensitivity (ArdourCanvas::ScrollGroup::ScrollsVertically| + ArdourCanvas::ScrollGroup::ScrollsHorizontally)); CANVAS_DEBUG_NAME (hv_scroll_group, "canvas hv scroll"); + _track_canvas->add_scroller (*hsg); _verbose_cursor = new VerboseCursor (this); |