Tempo ramps - fix more wtfery.
authornick_m <mainsbridge@gmail.com>
Wed, 6 Apr 2016 17:46:29 +0000 (03:46 +1000)
committernick_m <mainsbridge@gmail.com>
Fri, 27 May 2016 13:38:14 +0000 (23:38 +1000)
libs/ardour/tempo.cc

index d33ba0af4dfc252ab1347d76c3161af4ffde6d55..59942f8d8171cce24b7273874e0ac71e5f461044 100644 (file)
@@ -2908,6 +2908,18 @@ TempoMap::set_state (const XMLNode& node, int /*version*/)
                        _metrics.sort (cmp);
                }
 
+               /* check for legacy sessions where bbt was the base musical unit for tempo */
+               for (Metrics::const_iterator i = _metrics.begin(); i != _metrics.end(); ++i) {
+                       TempoSection* t;
+                       if ((t = dynamic_cast<TempoSection*> (*i)) != 0) {
+                               if (t->legacy_bbt().bars != 0) {
+                                       fix_legacy_session();
+                                       break;
+                               }
+                               break;
+                       }
+               }
+
                /* check for multiple tempo/meters at the same location, which
                   ardour2 somehow allowed.
                */
@@ -2936,18 +2948,6 @@ TempoMap::set_state (const XMLNode& node, int /*version*/)
                        prev = i;
                }
 
-               /* check for legacy sessions where bbt was the base musical unit for tempo */
-               for (Metrics::const_iterator i = _metrics.begin(); i != _metrics.end(); ++i) {
-                       TempoSection* t;
-                       if ((t = dynamic_cast<TempoSection*> (*i)) != 0) {
-                               if (t->legacy_bbt().bars != 0) {
-                                       fix_legacy_session();
-                                       break;
-                               }
-                               break;
-                       }
-               }
-
                recompute_map (_metrics);
        }