diff options
author | Robin Gareus <robin@gareus.org> | 2013-07-09 01:25:54 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-07-10 15:27:14 +0200 |
commit | 24f2961cce98f296ef6c1824cce86c241bb120e6 (patch) | |
tree | 59ec591011a23548d39c321880cac3047247b4f3 /libs/ardour/session_state.cc | |
parent | 4d49961c93fe23dc4f76a5bcb60c93d0c80bcd3c (diff) |
...towards unique track numbers.
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 49a0eed559..59e0331383 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1033,6 +1033,9 @@ Session::state (bool full_state) snprintf (buf, sizeof (buf), "%" PRIu64, ID::counter()); node->add_property ("id-counter", buf); + snprintf (buf, sizeof (buf), "%d", _unique_track_number); + node->add_property ("trackid-counter", buf); + /* save the event ID counter */ snprintf (buf, sizeof (buf), "%d", Evoral::event_id_counter()); @@ -1241,6 +1244,10 @@ Session::set_state (const XMLNode& node, int version) ID::init_counter (now); } + if ((prop = node.property (X_("trackid-counter"))) != 0) { + _unique_track_number = atoi (prop->value()); + } + if ((prop = node.property (X_("event-counter"))) != 0) { Evoral::init_event_id_counter (atoi (prop->value())); } |