summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-07-19 20:37:57 +0200
committerRobin Gareus <robin@gareus.org>2017-07-19 22:15:22 +0200
commit1438086c6cdad872c138a84022dbd6d850ab424f (patch)
treeae478ca494d1696e828f425a40a2da7210a38ff5 /gtk2_ardour
parent92a1d3619bfc94e649fbbc4b4cd12c3c89978d6b (diff)
tweak "visible track count", take automation lanes into account.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 712e1a8f1f..8fc9257fc5 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -3812,11 +3812,21 @@ Editor::set_visible_track_count (int32_t n)
str = s.str();
} else if (_visible_track_count == 0) {
uint32_t n = 0;
- for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
+ for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) {
if ((*i)->marked_for_display()) {
++n;
+ TimeAxisView::Children cl ((*i)->get_child_list ());
+ for (TimeAxisView::Children::const_iterator j = cl.begin(); j != cl.end(); ++j) {
+ if ((*j)->marked_for_display()) {
+ ++n;
+ }
+ }
}
}
+ if (n == 0) {
+ visible_tracks_selector.set_text (X_("*"));
+ return;
+ }
h = trackviews_height() / n;
str = _("All");
} else {