Look in the UsesPatchNameList for the name rather than
authorCarl Hetherington <carl@carlh.net>
Sun, 3 Jun 2012 15:47:23 +0000 (15:47 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 3 Jun 2012 15:47:23 +0000 (15:47 +0000)
its parent.

git-svn-id: svn://localhost/ardour2/branches/3.0@12551 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/midi++2/midnam_patch.cc

index efc6c1c6a0bd8b424bf45b361d87b81a020b692d..86edc7504e01111232624e7e97a9bf0002c523e4 100644 (file)
@@ -236,7 +236,7 @@ PatchBank::set_state (const XMLTree& tree, const XMLNode& node)
        } else {
                XMLNode* use_patch_name_list = node.child ("UsesPatchNameList");
                if (use_patch_name_list) {
-                       _patch_list_name = node.property ("Name")->value();
+                       _patch_list_name = use_patch_name_list->property ("Name")->value();
                } else {
                        error << "Patch without patch name list - patchfile will be ignored" << endmsg;
                        return -1;
@@ -475,7 +475,7 @@ MIDINameDocument::MIDINameDocument (const string& filename)
        if (!_document.read (filename)) {
                throw failed_constructor ();
        }
-       
+
        set_state (_document, *_document.root());
 }