Remove implicit saves when removing empty sources
This fixes an implicit save when importing files. The Track's disk-reader is initially created with an empty source which is later replaced and dropped: ARDOUR::Session::save_state ARDOUR::Session::remove_source PBD::Destructible::drop_references ARDOUR::DiskWriter::reset_write_sources ARDOUR::DiskWriter::set_write_source_name ARDOUR::Track::set_name Editor::finish_bringing_in_material
This commit is contained in:
parent
3a9bf57af9
commit
61d11347b6
@ -4456,15 +4456,23 @@ Session::remove_source (boost::weak_ptr<Source> src)
|
||||
if ((i = sources.find (source->id())) != sources.end()) {
|
||||
sources.erase (i);
|
||||
SourceRemoved (src); /* EMIT SIGNAL */
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_cleanup () && !loading ()) {
|
||||
if (source->empty ()) {
|
||||
/* No need to save when empty sources are removed.
|
||||
* This is likely due to disk-writer initial dummies
|
||||
* where files don't even exist on disk.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
if (!in_cleanup () && !loading ()) {
|
||||
/* save state so we don't end up with a session file
|
||||
* referring to non-existent sources.
|
||||
*/
|
||||
|
||||
save_state ();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user