13
0

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
This commit is contained in:
Carl Hetherington 2010-09-28 22:31:24 +00:00
parent f761f13f6b
commit 045754c52b

View File

@ -110,7 +110,7 @@ Source::get_state ()
} }
int int
Source::set_state (const XMLNode& node, int /*version*/) Source::set_state (const XMLNode& node, int version)
{ {
const XMLProperty* prop; const XMLProperty* prop;
@ -146,12 +146,15 @@ Source::set_state (const XMLNode& node, int /*version*/)
_flags = Flag (_flags | Destructive); _flags = Flag (_flags | Destructive);
} }
if (version < 3000) {
/* a source with an XML node must necessarily already exist, /* a source with an XML node must necessarily already exist,
and therefore cannot be removable/writable etc. etc. and therefore cannot be removable/writable etc. etc.; 2.X
sometimes marks sources as removable which shouldn't be.
*/ */
if (!(_flags & Destructive)) { if (!(_flags & Destructive)) {
_flags = Flag (_flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy|CanRename)); _flags = Flag (_flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy|CanRename));
} }
}
return 0; return 0;
} }