diff options
author | Carl Hetherington <carl@carlh.net> | 2011-09-14 17:16:54 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-09-14 17:16:54 +0000 |
commit | 8f39701908660bbf2c7d2f2867ea83638daf33f0 (patch) | |
tree | 0085d26d65d07a9a46a286467e2d1404d0f2f49b /libs/ardour | |
parent | 69da82a0213ebac8dfa42af90f8c798df5ed7947 (diff) |
Load the tempo map before the locations so that locations
can compute their BBT positions correctly (#4276).
git-svn-id: svn://localhost/ardour2/branches/3.0@10081 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/session_state.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index e43be3cd44..95c59fd5e6 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1271,6 +1271,24 @@ Session::set_state (const XMLNode& node, int version) } } + if ((child = find_named_node (node, X_("Speakers"))) != 0) { + _speakers->set_state (*child, version); + } + + if ((child = find_named_node (node, "Sources")) == 0) { + error << _("Session: XML state has no sources section") << endmsg; + goto out; + } else if (load_sources (*child)) { + goto out; + } + + if ((child = find_named_node (node, "TempoMap")) == 0) { + error << _("Session: XML state has no Tempo Map section") << endmsg; + goto out; + } else if (_tempo_map->set_state (*child, version)) { + goto out; + } + if ((child = find_named_node (node, "Locations")) == 0) { error << _("Session: XML state has no locations section") << endmsg; goto out; @@ -1278,10 +1296,6 @@ Session::set_state (const XMLNode& node, int version) goto out; } - if ((child = find_named_node (node, X_("Speakers"))) != 0) { - _speakers->set_state (*child, version); - } - Location* location; if ((location = _locations->auto_loop_location()) != 0) { @@ -1301,20 +1315,6 @@ Session::set_state (const XMLNode& node, int version) AudioFileSource::set_header_position_offset (_session_range_location->start()); } - if ((child = find_named_node (node, "Sources")) == 0) { - error << _("Session: XML state has no sources section") << endmsg; - goto out; - } else if (load_sources (*child)) { - goto out; - } - - if ((child = find_named_node (node, "TempoMap")) == 0) { - error << _("Session: XML state has no Tempo Map section") << endmsg; - goto out; - } else if (_tempo_map->set_state (*child, version)) { - goto out; - } - if ((child = find_named_node (node, "Regions")) == 0) { error << _("Session: XML state has no Regions section") << endmsg; goto out; |