From 0ba7fe8ee8c1a677d23d178af943635ad33aa0a9 Mon Sep 17 00:00:00 2001
From: bakajikara <102702868+bakajikara@users.noreply.github.com>
Date: Fri, 9 Jun 2023 15:05:15 +0900
Subject: [PATCH] Add setPropertyFlags
---
src/engraving/rw/read114/read114.cpp | 3 +++
src/engraving/rw/read206/read206.cpp | 3 +++
src/palette/internal/palettecreator.cpp | 10 ++++++++++
3 files changed, 16 insertions(+)
diff --git a/src/engraving/rw/read114/read114.cpp b/src/engraving/rw/read114/read114.cpp
index 1ac0f094e243d..871b360eb7321 100644
--- a/src/engraving/rw/read114/read114.cpp
+++ b/src/engraving/rw/read114/read114.cpp
@@ -1379,18 +1379,21 @@ static void readPedal114(XmlReader& e, ReadContext& ctx, Pedal* pedal)
text.at(0).isDigit()
? resolveSymCompatibility(SymId(text.toInt()), ctx.mscoreVersion())
: text));
+ pedal->setPropertyFlags(Pid::BEGIN_TEXT, PropertyFlags::UNSTYLED);
} else if (tag == "continueSymbol") {
String text(e.readText());
pedal->setContinueText(String(u"%1").arg(
text.at(0).isDigit()
? resolveSymCompatibility(SymId(text.toInt()), ctx.mscoreVersion())
: text));
+ pedal->setPropertyFlags(Pid::CONTINUE_TEXT, PropertyFlags::UNSTYLED);
} else if (tag == "endSymbol") {
String text(e.readText());
pedal->setEndText(String(u"%1").arg(
text.at(0).isDigit()
? resolveSymCompatibility(SymId(text.toInt()), ctx.mscoreVersion())
: text));
+ pedal->setPropertyFlags(Pid::END_TEXT, PropertyFlags::UNSTYLED);
} else if (tag == "beginSymbolOffset") { // obsolete
e.readPoint();
} else if (tag == "continueSymbolOffset") { // obsolete
diff --git a/src/engraving/rw/read206/read206.cpp b/src/engraving/rw/read206/read206.cpp
index 76769d5dd8dd1..3a237351df80e 100644
--- a/src/engraving/rw/read206/read206.cpp
+++ b/src/engraving/rw/read206/read206.cpp
@@ -1987,16 +1987,19 @@ static bool readTextLineProperties(XmlReader& e, ReadContext& ctx, TextLineBase*
Text* text = Factory::createText(ctx.dummy(), TextStyleType::DEFAULT, false);
readText206(e, ctx, text, tl);
tl->setBeginText(text->xmlText());
+ tl->setPropertyFlags(Pid::BEGIN_TEXT, PropertyFlags::UNSTYLED);
delete text;
} else if (tag == "continueText") {
Text* text = Factory::createText(ctx.dummy(), TextStyleType::DEFAULT, false);
readText206(e, ctx, text, tl);
tl->setContinueText(text->xmlText());
+ tl->setPropertyFlags(Pid::CONTINUE_TEXT, PropertyFlags::UNSTYLED);
delete text;
} else if (tag == "endText") {
Text* text = Factory::createText(ctx.dummy(), TextStyleType::DEFAULT, false);
readText206(e, ctx, text, tl);
tl->setEndText(text->xmlText());
+ tl->setPropertyFlags(Pid::END_TEXT, PropertyFlags::UNSTYLED);
delete text;
} else if (tag == "beginHook") {
tl->setBeginHookType(e.readBool() ? HookType::HOOK_90 : HookType::NONE);
diff --git a/src/palette/internal/palettecreator.cpp b/src/palette/internal/palettecreator.cpp
index 101856f2f4c27..3863b121c8a2e 100644
--- a/src/palette/internal/palettecreator.cpp
+++ b/src/palette/internal/palettecreator.cpp
@@ -1258,15 +1258,20 @@ PalettePtr PaletteCreator::newLinesPalette(bool defaultPalette)
auto pedal = makeElement(gpaletteScore);
pedal->setLen(w);
pedal->setBeginText(Pedal::PEDAL_SYMBOL);
+ pedal->setPropertyFlags(Pid::BEGIN_TEXT, PropertyFlags::UNSTYLED);
pedal->setContinueText(QString("(%1)").arg(Pedal::PEDAL_SYMBOL));
+ pedal->setPropertyFlags(Pid::CONTINUE_TEXT, PropertyFlags::UNSTYLED);
pedal->setEndHookType(HookType::HOOK_90);
sp->appendElement(pedal, QT_TRANSLATE_NOOP("palette", "Pedal (with ped and line)"));
pedal = makeElement(gpaletteScore);
pedal->setLen(w);
pedal->setBeginText(Pedal::PEDAL_SYMBOL);
+ pedal->setPropertyFlags(Pid::BEGIN_TEXT, PropertyFlags::UNSTYLED);
pedal->setContinueText(QString("(%1)").arg(Pedal::PEDAL_SYMBOL));
+ pedal->setPropertyFlags(Pid::CONTINUE_TEXT, PropertyFlags::UNSTYLED);
pedal->setEndText(Pedal::STAR_SYMBOL);
+ pedal->setPropertyFlags(Pid::END_TEXT, PropertyFlags::UNSTYLED);
pedal->setLineVisible(false);
sp->appendElement(pedal, QT_TRANSLATE_NOOP("palette", "Pedal (with ped and asterisk)"));
@@ -1931,15 +1936,20 @@ PalettePtr PaletteCreator::newKeyboardPalette()
auto pedal = makeElement(gpaletteScore);
pedal->setLen(w);
pedal->setBeginText(Pedal::PEDAL_SYMBOL);
+ pedal->setPropertyFlags(Pid::BEGIN_TEXT, PropertyFlags::UNSTYLED);
pedal->setContinueText(QString("(%1)").arg(Pedal::PEDAL_SYMBOL));
+ pedal->setPropertyFlags(Pid::CONTINUE_TEXT, PropertyFlags::UNSTYLED);
pedal->setEndText(Pedal::STAR_SYMBOL);
+ pedal->setPropertyFlags(Pid::END_TEXT, PropertyFlags::UNSTYLED);
pedal->setLineVisible(false);
sp->appendElement(pedal, QT_TRANSLATE_NOOP("palette", "Pedal (with ped and asterisk)"));
pedal = makeElement(gpaletteScore);
pedal->setLen(w);
pedal->setBeginText(Pedal::PEDAL_SYMBOL);
+ pedal->setPropertyFlags(Pid::BEGIN_TEXT, PropertyFlags::UNSTYLED);
pedal->setContinueText(QString("(%1)").arg(Pedal::PEDAL_SYMBOL));
+ pedal->setPropertyFlags(Pid::CONTINUE_TEXT, PropertyFlags::UNSTYLED);
pedal->setEndHookType(HookType::HOOK_90);
sp->appendElement(pedal, QT_TRANSLATE_NOOP("palette", "Pedal (with ped and line)"));