diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-04-04 15:26:44 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-04-14 13:00:24 -0400 |
commit | e1bf151ab0a5dd1d467ea2f43b0cd9c70caecfae (patch) | |
tree | b962a98833202c01b9b36f5f189cf5a41fec6a18 /libs/ardour/smf_source.cc | |
parent | 99bf5d9eeda1e5e1811d660c0c22bb5a2d4984c0 (diff) |
after cloning a MIDI region, mark the source file as non-removable. Fixes reports about missing MIDI files on the forums and IRC
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)); +} |