From ec29f5d64cd59f27f2953cb3363c2bb9c4a21eb2 Mon Sep 17 00:00:00 2001 From: nick_m Date: Thu, 7 Apr 2016 03:46:29 +1000 Subject: [PATCH] Tempo ramps - fix more wtfery. --- libs/ardour/tempo.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index d33ba0af4d..59942f8d81 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -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 (*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 (*i)) != 0) { - if (t->legacy_bbt().bars != 0) { - fix_legacy_session(); - break; - } - break; - } - } - recompute_map (_metrics); }