From 0a82570145717346c42e04e4c0cf85183fa3eae0 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Wed, 7 Feb 2024 09:47:10 +0100 Subject: [PATCH] Add support for meterSig@color --- include/vrv/metersig.h | 1 + src/iomei.cpp | 2 ++ src/metersig.cpp | 3 +++ 3 files changed, 6 insertions(+) diff --git a/include/vrv/metersig.h b/include/vrv/metersig.h index 610458329b1..585c259b9c4 100644 --- a/include/vrv/metersig.h +++ b/include/vrv/metersig.h @@ -25,6 +25,7 @@ class ScoreDefInterface; * This class models the MEI element. */ class MeterSig : public LayerElement, + public AttColor, public AttEnclosingChars, public AttExtSymNames, public AttMeterSigLog, diff --git a/src/iomei.cpp b/src/iomei.cpp index ad9afa02d92..aa139f99077 100644 --- a/src/iomei.cpp +++ b/src/iomei.cpp @@ -2629,6 +2629,7 @@ void MEIOutput::WriteMeterSig(pugi::xml_node currentNode, MeterSig *meterSig) } this->WriteLayerElement(currentNode, meterSig); + meterSig->WriteColor(currentNode); meterSig->WriteEnclosingChars(currentNode); meterSig->WriteMeterSigLog(currentNode); meterSig->WriteMeterSigVis(currentNode); @@ -6689,6 +6690,7 @@ bool MEIInput::ReadMeterSig(Object *parent, pugi::xml_node meterSig) this->UpgradeMeterSigTo_5_0(meterSig, vrvMeterSig); } + vrvMeterSig->ReadColor(meterSig); vrvMeterSig->ReadEnclosingChars(meterSig); vrvMeterSig->ReadExtSymNames(meterSig); vrvMeterSig->ReadMeterSigLog(meterSig); diff --git a/src/metersig.cpp b/src/metersig.cpp index ccd59b25e93..f3df8054d23 100644 --- a/src/metersig.cpp +++ b/src/metersig.cpp @@ -31,6 +31,7 @@ static const ClassRegistrar s_factory("meterSig", METERSIG); MeterSig::MeterSig() : LayerElement(METERSIG, "msig-") + , AttColor() , AttEnclosingChars() , AttExtSymNames() , AttMeterSigLog() @@ -38,6 +39,7 @@ MeterSig::MeterSig() , AttTypography() , AttVisibility() { + this->RegisterAttClass(ATT_COLOR); this->RegisterAttClass(ATT_ENCLOSINGCHARS); this->RegisterAttClass(ATT_EXTSYMNAMES); this->RegisterAttClass(ATT_METERSIGLOG); @@ -53,6 +55,7 @@ MeterSig::~MeterSig() {} void MeterSig::Reset() { LayerElement::Reset(); + this->ResetColor(); this->ResetEnclosingChars(); this->ResetExtSymNames(); this->ResetMeterSigLog();