diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-04-04 15:26:44 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-04-04 15:26:44 -0400 |
commit | fc691cb3ba6c1a49b1b71f1169097bee0292f3cc (patch) | |
tree | a348af2807bb9727ccdf050722a99f2b318c0ece /libs/ardour/smf_source.cc | |
parent | 3e7fad52f5035325be02b88baa00be6210e05fe9 (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 c504f50006..62ecab1397 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -73,9 +73,10 @@ SMFSource::SMFSource (Session& s, const string& path, Source::Flag flags) return; } - if (open(_path)) { + if (open (_path)) { throw failed_constructor (); } + _open = true; } @@ -658,3 +659,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)); +} |