diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 6a9907b5a9..bf430c72fd 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -509,17 +509,12 @@ Session::Session (AudioEngine &eng, } bool was_dirty = dirty(); - unset_dirty (); PresentationInfo::Change.connect_same_thread (*this, boost::bind (&Session::notify_presentation_info_change, this, _1)); Config->ParameterChanged.connect_same_thread (*this, boost::bind (&Session::config_changed, this, _1, false)); config.ParameterChanged.connect_same_thread (*this, boost::bind (&Session::config_changed, this, _1, true)); - if (was_dirty) { - DirtyChanged (); /* EMIT SIGNAL */ - } - StartTimeChanged.connect_same_thread (*this, boost::bind (&Session::start_time_changed, this, _1)); EndTimeChanged.connect_same_thread (*this, boost::bind (&Session::end_time_changed, this, _1)); @@ -553,7 +548,18 @@ Session::Session (AudioEngine &eng, _is_new = true; } + /* unsets dirty flag */ session_loaded (); + + if (_is_new && unnamed) { + set_dirty (); + was_dirty = false; + } + + if (was_dirty) { + DirtyChanged (); /* EMIT SIGNAL */ + } + _is_new = false; if (need_template_resave) { diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 08c01cb9df..0ca1d62f3a 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -407,8 +407,6 @@ Session::post_engine_init () /* Can't do this until the trigger input MIDI port is set up */ TriggerBox::static_init (*this); - set_clean (); - /* Now, finally, we can [ask the butler to] fill the playback buffers */ BootMessage (_("Filling playback buffers"));