File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,28 @@ engraving::PropertyValue Pedal::propertyDefault(Pid propertyId) const
196196 }
197197}
198198
199+ bool Pedal::setProperty (Pid propertyId, const PropertyValue& v)
200+ {
201+ if (propertyId == Pid::BEGIN_HOOK_TYPE) {
202+ setBeginHookType (v.value <HookType>());
203+
204+ // Update style flag for text
205+ PropertyFlags beginTextStyleFlag = beginText () == propertyDefault (Pid::BEGIN_TEXT).value <String>()
206+ ? PropertyFlags::STYLED : PropertyFlags::UNSTYLED;
207+ setPropertyFlags (Pid::BEGIN_TEXT, beginTextStyleFlag);
208+ PropertyFlags continueTextStyleFlag = continueText () == propertyDefault (Pid::CONTINUE_TEXT).value <String>()
209+ ? PropertyFlags::STYLED : PropertyFlags::UNSTYLED;
210+ setPropertyFlags (Pid::CONTINUE_TEXT, continueTextStyleFlag);
211+ PropertyFlags endTextStyleFlag = endText () == propertyDefault (Pid::END_TEXT).value <String>()
212+ ? PropertyFlags::STYLED : PropertyFlags::UNSTYLED;
213+ setPropertyFlags (Pid::END_TEXT, endTextStyleFlag);
214+ triggerLayout ();
215+ return true ;
216+ }
217+
218+ return TextLineBase::setProperty (propertyId, v);
219+ }
220+
199221Pedal* Pedal::findNextInStaff () const
200222{
201223 Fraction endTick = tick2 ();
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ class Pedal final : public TextLineBase
7272
7373 LineSegment* createLineSegment (System* parent) override ;
7474 PropertyValue propertyDefault (Pid propertyId) const override ;
75+ bool setProperty (Pid propertyId, const PropertyValue& v) override ;
7576
7677 Pedal* findNextInStaff () const ;
7778 bool connect45HookToNext () const ;
You can’t perform that action at this time.
0 commit comments