Merge pull request #2148 from AntonioBL/resettextstyle

Fix #72051 : reset text to style
This commit is contained in:
Werner Schweer 2015-10-28 16:53:43 +01:00
commit e25b67b25e

View file

@ -68,7 +68,8 @@ void InspectorText::resetToStyle()
for (Element* e : inspector->el()) {
Text* text = static_cast<Text*>(e);
text->undoChangeProperty(P_ID::TEXT_STYLE, QVariant::fromValue(score->textStyle(text->textStyleType())));
text->undoChangeProperty(P_ID::TEXT, text->plainText());
// Preserve <sym> tags
text->undoChangeProperty(P_ID::TEXT, text->plainText().toHtmlEscaped().replace("&lt;sym&gt;","<sym>").replace("&lt;/sym&gt;","</sym>"));
}
score->endCmd();
}