diff options
Diffstat (limited to 'libs/ardour/smf_source.cc')
-rw-r--r-- | libs/ardour/smf_source.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index 52c950e76f..4167bea877 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -72,9 +72,10 @@ SMFSource::SMFSource (Session& s, const string& path, Source::Flag flags) return; } - if (open(_path)) { + if (open (_path)) { throw failed_constructor (); } + _open = true; } @@ -657,3 +658,12 @@ SMFSource::ensure_disk_file () } } +void +SMFSource::prevent_deletion () +{ + /* Unlike the audio case, the MIDI file remains mutable (because we can + edit MIDI data) + */ + + _flags = Flag (_flags & ~(Removable|RemovableIfEmpty|RemoveAtDestroy)); +} |