diff options
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index f1bfa5ea92..db3d9e94ae 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1281,6 +1281,20 @@ 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 ((child = find_named_node (node, "Routes")) == 0) { + error << _("Session: XML state has no routes section") << endmsg; + goto out; + } else if (load_routes (*child, version)) { + goto out; + } + if (version >= 3000) { if ((child = find_named_node (node, "RouteGroups")) == 0) { @@ -1307,20 +1321,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 ((child = find_named_node (node, "Routes")) == 0) { - error << _("Session: XML state has no routes section") << endmsg; - goto out; - } else if (load_routes (*child, version)) { - goto out; - } - if ((child = find_named_node (node, "Click")) == 0) { warning << _("Session: XML state has no click section") << endmsg; } else if (_click_io) { @@ -2103,15 +2103,14 @@ Session::remove_route_group (RouteGroup& rg) list<RouteGroup*>::iterator i; if ((i = find (_route_groups.begin(), _route_groups.end(), &rg)) != _route_groups.end()) { - (*i)->apply (&Route::drop_route_group, this); _route_groups.erase (i); + delete &rg; + route_group_removed (); /* EMIT SIGNAL */ } - delete &rg; } - RouteGroup * Session::route_group_by_name (string name) { |