mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +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
|
|
@ -38,6 +38,7 @@
|
|||
#include "ardour/midi_model.h"
|
||||
#include "ardour/midi_state_tracker.h"
|
||||
#include "ardour/midi_source.h"
|
||||
#include "ardour/file_source.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/session_directory.h"
|
||||
#include "ardour/source_factory.h"
|
||||
|
|
@ -380,6 +381,10 @@ MidiSource::clone (const string& path, Evoral::MusicalTime begin, Evoral::Musica
|
|||
} else {
|
||||
newsrc->set_model (_model);
|
||||
}
|
||||
|
||||
/* this file is not removable (but since it is MIDI, it is mutable) */
|
||||
|
||||
boost::dynamic_pointer_cast<FileSource> (newsrc)->prevent_deletion ();
|
||||
|
||||
return newsrc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue