From 045754c52b8de047c74df32d706b6a35dc066fa5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 28 Sep 2010 22:31:24 +0000 Subject: 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 --- libs/ardour/source.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'libs/ardour/source.cc') 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; } -- cgit v1.2.3