summaryrefslogtreecommitdiff
path: root/libs/ardour/source.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-09-28 22:31:24 +0000
committerCarl Hetherington <carl@carlh.net>2010-09-28 22:31:24 +0000
commit045754c52b8de047c74df32d706b6a35dc066fa5 (patch)
tree36d9c1ebdef3ce8079d9fc68b50a708aa3089e74 /libs/ardour/source.cc
parentf761f13f6b0d52355ac4a26d6075d9a0b377ac8b (diff)
Don't mark reloaded MIDI sources as non-writable. Fixes #3483.
git-svn-id: svn://localhost/ardour2/branches/3.0@7853 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/source.cc')
-rw-r--r--libs/ardour/source.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc
index e5aa759670..c299588f3c 100644
--- a/libs/ardour/source.cc
+++ b/libs/ardour/source.cc
@@ -110,7 +110,7 @@ Source::get_state ()
}
int
-Source::set_state (const XMLNode& node, int /*version*/)
+Source::set_state (const XMLNode& node, int version)
{
const XMLProperty* prop;
@@ -146,12 +146,15 @@ Source::set_state (const XMLNode& node, int /*version*/)
_flags = Flag (_flags | Destructive);
}
- /* a source with an XML node must necessarily already exist,
- and therefore cannot be removable/writable etc. etc.
- */
- if (!(_flags & Destructive)) {
- _flags = Flag (_flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy|CanRename));
- }
+ if (version < 3000) {
+ /* a source with an XML node must necessarily already exist,
+ and therefore cannot be removable/writable etc. etc.; 2.X
+ sometimes marks sources as removable which shouldn't be.
+ */
+ if (!(_flags & Destructive)) {
+ _flags = Flag (_flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy|CanRename));
+ }
+ }
return 0;
}