summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-09-17 12:28:09 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-09-17 12:28:09 -0400
commitcfc658de0412555980bf6c8b9624f5d9c806ae04 (patch)
treef4a0f48a3d93009b9d8f8a55d1cd93957c473724 /libs/ardour
parent69bfc841a285a3f6aa650826140c9ec967e63913 (diff)
do not mark session dirty during loading process; sync with loaded locations state using standard method
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/session_state.cc23
1 files changed, 9 insertions, 14 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index b4dce43327..cfd6b9c1e0 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -318,6 +318,8 @@ Session::post_engine_init ()
_locations->changed.connect_same_thread (*this, boost::bind (&Session::locations_changed, this));
_locations->added.connect_same_thread (*this, boost::bind (&Session::locations_added, this, _1));
+
+
} catch (AudioEngine::PortRegistrationFailure& err) {
/* handle this one in a different way than all others, so that its clear what happened */
error << err.what() << endmsg;
@@ -1232,20 +1234,7 @@ Session::set_state (const XMLNode& node, int version)
goto out;
}
- Location* location;
-
- if ((location = _locations->auto_loop_location()) != 0) {
- set_auto_loop_location (location);
- }
-
- if ((location = _locations->auto_punch_location()) != 0) {
- set_auto_punch_location (location);
- }
-
- if ((location = _locations->session_range_location()) != 0) {
- delete _session_range_location;
- _session_range_location = location;
- }
+ locations_changed ();
if (_session_range_location) {
AudioFileSource::set_header_position_offset (_session_range_location->start());
@@ -2893,6 +2882,12 @@ Session::cleanup_trash_sources (CleanupReport& rep)
void
Session::set_dirty ()
{
+ /* never mark session dirty during loading */
+
+ if (_state_of_the_state & Loading) {
+ return;
+ }
+
bool was_dirty = dirty();
_state_of_the_state = StateOfTheState (_state_of_the_state | Dirty);