mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 09:36:33 +01:00
after cloning a MIDI region, mark the source file as non-removable. Fixes reports about missing MIDI files on the forums and IRC
This commit is contained in:
parent
3e7fad52f5
commit
fc691cb3ba
4 changed files with 20 additions and 2 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue