Skip to content

Commit ef2be10

Browse files
authored
Merge pull request #4288 from rettinghaus/fix/vgrp
fix vgrp in MusicXML import
2 parents f0ab33d + 619f1da commit ef2be10

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/iomusxml.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,8 +2384,10 @@ void MusicXmlInput::ReadMusicXmlDirection(
23842384
}
23852385

23862386
this->TextRendition(words, dir);
2387-
defaultY = (defaultY < 0) ? std::abs(defaultY) : defaultY + 2000;
2388-
dir->SetVgrp(defaultY);
2387+
if (defaultY) {
2388+
defaultY = (defaultY < 0) ? std::abs(defaultY) : defaultY + 2000;
2389+
dir->SetVgrp(defaultY);
2390+
}
23892391
m_controlElements.push_back({ measureNum, dir });
23902392
m_dirStack.push_back(dir);
23912393

0 commit comments

Comments
 (0)