summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-07-15 18:09:04 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-07-15 18:09:04 -0400
commitb69870dfe64388e76d60b8f2224dc53192c3153d (patch)
tree96663fb0c8c0046b54c435ac22f480b2509c4390 /gtk2_ardour/editor_canvas.cc
parentbb69a557843b62d683595b35a8d3ee8e7771716a (diff)
add Editor::trackviews_height() convenience function to determine height of trackview area of canvas; use to help fix set_visible_track_count(); don't consider hidden tracks in that function; add "Selected" to that selector menu
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r--gtk2_ardour/editor_canvas.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index c518472f0c..66caeb7bc6 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -1352,3 +1352,13 @@ Editor::choose_canvas_cursor_on_entry (GdkEventCrossing* /*event*/, ItemType typ
set_canvas_cursor (cursor, false);
}
}
+
+double
+Editor::trackviews_height() const
+{
+ if (!_trackview_group) {
+ return 0;
+ }
+
+ return _visible_canvas_height - _trackview_group->canvas_origin().y;
+}