More zoom / timeline tidying.
[dcpomatic.git] / src / wx / timeline_labels_view.cc
index 3d0b4265173419e2cd55b9c6629ed355b4961edc..43adfc936a41820b1659ff38eb2c2a1554b4442f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2016-2018 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -31,6 +31,7 @@ using std::max;
 TimelineLabelsView::TimelineLabelsView (Timeline& tl)
        : TimelineView (tl)
        , _threed (true)
+       , _audio_tracks (0)
        , _subtitle_tracks (0)
        , _atmos (true)
 {
@@ -81,8 +82,10 @@ TimelineLabelsView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> >
                fy = ty;
        }
 
-       ty = _timeline.tracks() * h;
-       gc->DrawText (_("Audio"), 0, (ty + fy) / 2 - 8);
+       if (_audio_tracks) {
+               ty = _timeline.tracks() * h;
+               gc->DrawText (_("Audio"), 0, (ty + fy) / 2 - 8);
+       }
 }
 
 void
@@ -91,6 +94,12 @@ TimelineLabelsView::set_3d (bool s)
        _threed = s;
 }
 
+void
+TimelineLabelsView::set_audio_tracks (int n)
+{
+       _audio_tracks = n;
+}
+
 void
 TimelineLabelsView::set_subtitle_tracks (int n)
 {