Fix display of Atmos tracks in the timeline.
authorCarl Hetherington <cth@carlh.net>
Thu, 18 Jun 2020 10:53:38 +0000 (12:53 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 18 Jun 2020 10:53:38 +0000 (12:53 +0200)
src/wx/timeline.cc

index 9f71847f5c626dfb7e39690c91010e19d4f54252..cbea2333c8293d6dade6acfba38f6c6b749eb7d2 100644 (file)
@@ -420,12 +420,9 @@ Timeline::assign_tracks ()
 
        bool have_atmos = false;
        BOOST_FOREACH (shared_ptr<TimelineView> i, _views) {
-               shared_ptr<TimelineVideoContentView> cv = dynamic_pointer_cast<TimelineVideoContentView> (i);
-               if (!cv) {
-                       continue;
-               }
-               if (dynamic_pointer_cast<TimelineAtmosContentView> (i)) {
-                       cv->set_track (_tracks - 1);
+               shared_ptr<TimelineAtmosContentView> cv = dynamic_pointer_cast<TimelineAtmosContentView>(i);
+               if (cv) {
+                       cv->set_track (_tracks);
                        have_atmos = true;
                }
        }