From f16d97a013b5422154465ec59d8cd41e76122142 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 24 Feb 2020 22:16:56 +0100 Subject: [PATCH] Consolidate startup `state = Clean;` calls This also emits DirtyChanged() only if needed. --- libs/ardour/session_state.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 73d65ba7b6..ce9c7aa625 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -399,11 +399,9 @@ Session::post_engine_init () ltc_tx_initialize(); - _state_of_the_state = Clean; - Port::set_connecting_blocked (false); - DirtyChanged (); /* EMIT SIGNAL */ + set_clean (); /* Now, finally, we can fill the playback buffers */ @@ -425,9 +423,7 @@ Session::session_loaded () { SessionLoaded(); - _state_of_the_state = Clean; - - DirtyChanged (); /* EMIT SIGNAL */ + set_clean (); if (_is_new) { save_state (""); @@ -651,8 +647,6 @@ Session::create (const string& session_template, BusProfile const * bus_profile) } - _state_of_the_state = Clean; - /* set up Master Out and Monitor Out if necessary */ if (bus_profile) { @@ -670,6 +664,8 @@ Session::create (const string& session_template, BusProfile const * bus_profile) } } + set_clean (); + return 0; }