Skip to content

Commit

Permalink
early return in voice assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
rettinghaus committed Sep 16, 2024
1 parent 0820488 commit 368174d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/importexport/mei/internal/meiconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3359,18 +3359,19 @@ std::list<std::string> Convert::getTypeValuesWithPrefix(const std::string& typeS

void Convert::layerIdentFromMEI(engraving::EngravingItem* item, const libmei::Element& meiElement)
{
if (!item->hasVoiceAssignmentProperties()) {
return;
}

const libmei::AttLayerIdent* layerAtt = dynamic_cast<const libmei::AttLayerIdent*>(&meiElement);

IF_ASSERT_FAILED(layerAtt) {
return;
}

// @color
if (layerAtt->HasLayer()) {
// without further check we assume the layer to match
if (item->hasVoiceAssignmentProperties()) {
item->setProperty(engraving::Pid::VOICE_ASSIGNMENT, engraving::VoiceAssignment::CURRENT_VOICE_ONLY);
}
item->setProperty(engraving::Pid::VOICE_ASSIGNMENT, engraving::VoiceAssignment::CURRENT_VOICE_ONLY);
}
}

Expand Down

0 comments on commit 368174d

Please sign in to comment.