Same bug class fixed for segno/coda in PR #203. In DirectionReader::parseWords (DirectionReader.cpp:383):
outWords.colorData = getColor(wordEl);
// outWords.isColorSpecified is never set — stays false
getColor() returns an empty ColorData{} when the attribute is absent, so the caller must check checkHasColor and gate isColorSpecified accordingly. DirectionWriter only emits color when isColorSpecified is true, so the color silently drops on write.
Fix
Mirror the pattern already used in getPrintData (PrintFunctions.h:65-68):
if (checkHasColor(&wordEl))
{
outWords.isColorSpecified = true;
outWords.colorData = getColor(wordEl);
}
One-liner change; the same fix should be verified for parseRehearsal as well (it has the same call pattern).
References
Same bug class fixed for segno/coda in PR #203. In
DirectionReader::parseWords(DirectionReader.cpp:383):outWords.colorData = getColor(wordEl); // outWords.isColorSpecified is never set — stays falsegetColor()returns an emptyColorData{}when the attribute is absent, so the caller must checkcheckHasColorand gateisColorSpecifiedaccordingly.DirectionWriteronly emits color whenisColorSpecifiedis true, so the color silently drops on write.Fix
Mirror the pattern already used in
getPrintData(PrintFunctions.h:65-68):One-liner change; the same fix should be verified for
parseRehearsalas well (it has the same call pattern).References