Load the tempo map before regions so that MIDI region positions / lengths don't get...
authorCarl Hetherington <carl@carlh.net>
Sat, 26 Feb 2011 11:36:27 +0000 (11:36 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 26 Feb 2011 11:36:27 +0000 (11:36 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8964 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/session_state.cc

index 3dd1b5c5eb55d10f7ec60db856a4437a36a72730..102416b2e141fc09d98697b724b5fe57cd4d5231 100644 (file)
@@ -1265,7 +1265,7 @@ Session::set_state (const XMLNode& node, int version)
        Metadata
        Locations
        Sources
-       AudioRegions
+       Regions
        Connections
        Routes
        RouteGroups
@@ -1331,6 +1331,13 @@ Session::set_state (const XMLNode& node, int version)
                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;
@@ -1369,13 +1376,6 @@ Session::set_state (const XMLNode& node, int version)
                }
        }
        
-       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 (version < 3000) {
                if ((child = find_named_node (node, X_("DiskStreams"))) == 0) {
                        error << _("Session: XML state has no diskstreams section") << endmsg;