Skip to content

Commit

Permalink
Merge pull request #3078 from ericfont/181811-ValidateInstName
Browse files Browse the repository at this point in the history
fix #181811 validate instrument text name after editing
  • Loading branch information
lasconic committed Mar 20, 2017
2 parents e738a51 + 9343b8e commit c351a0e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libmscore/iname.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ void InstrumentName::endEdit()

QString s = plainText();

if (!validateText(s)) {
qWarning("Invalid instrument name: <%s>", s.toUtf8().data());
return;
}

if (_instrumentNameType == InstrumentNameType::LONG)
instrument->setLongName(s);
else
Expand Down

0 comments on commit c351a0e

Please sign in to comment.