summaryrefslogtreecommitdiff
path: root/libs/ardour/tempo.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2017-02-27 04:01:11 +1100
committerRobin Gareus <robin@gareus.org>2017-02-27 20:16:10 +0100
commitb3c68030f40bcfb5d3ad1fb537d0de58a32f0c9c (patch)
treefe7b082fbe9cadd232be56dfca78c8d7f0511ea8 /libs/ardour/tempo.cc
parent663d0e17431e0f841b4a5cde320323d78852a3b2 (diff)
hopefully fix legacy session loading (tempo)
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r--libs/ardour/tempo.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index c3ae1533dc..a45f6fb95e 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -155,6 +155,17 @@ TempoSection::TempoSection (const XMLNode& node, framecnt_t sample_rate)
_end_note_types_per_minute = _note_types_per_minute;
_legacy_end = true;
}
+ } else {
+ _legacy_end = true;
+ }
+
+ if ((prop = node.property ("tempo-type")) != 0) {
+ TempoSection::Type old_type;
+
+ old_type = Type (string_2_enum (prop->value(), old_type));
+ if (old_type == TempoSection::Constant) {
+ _end_note_types_per_minute = _note_types_per_minute;
+ }
}
if ((prop = node.property ("movable")) == 0) {
@@ -4501,8 +4512,6 @@ TempoMap::fix_legacy_end_session ()
if (prev_t) {
if (prev_t->type() == TempoSection::Ramp) {
prev_t->set_end_note_types_per_minute (t->note_types_per_minute());
- } else {
- prev_t->set_end_note_types_per_minute (prev_t->note_types_per_minute());
}
}