Merge pull request #379 from lvinken/21304-capx-2.0

fix #21304
This commit is contained in:
Nicolas Froment 2013-06-02 13:45:41 -07:00
commit 6f303d3a7f

View file

@ -848,7 +848,16 @@ void Capella::readCapxStaveLayout(XmlReader& e, CapStaffLayout* sl, int /*idx*/)
else if (tag == "instrument") {
sl->name = e.attribute("name");
sl->abbrev = e.attribute("abbrev");
e.readNext();
// elements name and abbrev overrule attributes name and abbrev
while (e.readNextStartElement()) {
const QStringRef& tag(e.name());
if (tag == "name")
sl->name = e.readElementText();
else if (tag == "abbrev")
sl->abbrev = e.readElementText();
else
e.unknown();
}
}
else if (tag == "sound") {
sl->sound = e.intAttribute("instr", 0);