From be93b1ee29b02570e223c0fd2fd0bf2b32c250ea Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 11 Dec 2025 22:09:46 +0100 Subject: [PATCH] Sort strip at export, retain current order on import --- libs/ardour/session_state.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 63fa386d8f..aa4095c036 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1133,11 +1133,14 @@ Session::export_route_state (std::shared_ptr rl, const string& path, PlaylistSet playlists; // SessionPlaylists SourceSet sources; + RouteList sorted_rl (*rl); + sorted_rl.sort (Stripable::Sorter ()); + /* these will work with new_route_from_template() * TODO: LV2 plugin-state-dir needs to be relative (on load?) */ child = node->add_child ("Routes"); - for (auto const& r: *rl) { + for (auto const& r: sorted_rl) { if (r->is_auditioner()) { continue; }