summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-07-20 16:27:34 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-07-20 16:27:34 +0000
commitbf91ed99ec2b1231c7150bde7f12c8ca573f0834 (patch)
tree52423ce3c3606ca76017070e0c2776ead4acd026 /libs/ardour/session_state.cc
parent3ef1a678b41725cce49dc0f0f816da445d6d9a76 (diff)
add note IDs and use them for looking up notes during a history rebuild. NOTE: INVALIDATES OLDER HISTORY FILES
git-svn-id: svn://localhost/ardour2/branches/3.0@7449 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 8ad239280c..9e4d2f281a 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -1043,6 +1043,11 @@ Session::state(bool full_state)
snprintf (buf, sizeof (buf), "%" PRIu64, ID::counter());
node->add_property ("id-counter", buf);
+ /* save the event ID counter */
+
+ snprintf (buf, sizeof (buf), "%d", Evoral::event_id_counter());
+ node->add_property ("event-counter", buf);
+
/* various options */
node->add_child_nocopy (config.get_variables ());
@@ -1225,6 +1230,9 @@ Session::set_state (const XMLNode& node, int version)
ID::init_counter (now);
}
+ if ((prop = node.property (X_("event-counter"))) != 0) {
+ Evoral::init_event_id_counter (atoi (prop->value()));
+ }
IO::disable_connecting ();