summaryrefslogtreecommitdiff
path: root/libs/ardour/smf_source.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/smf_source.cc')
-rw-r--r--libs/ardour/smf_source.cc12
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));
+}