pre-seed session-state-version.
authorRobin Gareus <robin@gareus.org>
Fri, 28 Aug 2015 12:07:48 +0000 (14:07 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 28 Aug 2015 12:08:32 +0000 (14:08 +0200)
copying/paste of many objects use ::set_state(, version) to set the
the state of the copy.  Stateful::loading_state_version is used for
state-version in those cases.

This fails for a New Session (version==0) or when creating a New Session
after loading an Ardour2 session.

libs/ardour/session.cc

index 29e0777cfa1aa947b42a5217397766fcd4272c13..85a2c67f4382952c8beba37cefd949aab821b349 100644 (file)
@@ -305,6 +305,8 @@ Session::Session (AudioEngine &eng,
        
        if (_is_new) {
 
+               Stateful::loading_state_version = CURRENT_SESSION_FILE_VERSION;
+
 #ifdef USE_TRACKS_CODE_FEATURES                
                sr = EngineStateController::instance()->get_current_sample_rate();
 #endif