diff options
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 8 |
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 (); |