Clarify new session dirty state
New unnamed sessions need to remain dirty so that the GUI asks to save or delete the session.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user