Skip to content

Commit

Permalink
Disable 'Play' toggle for text- & notelines
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoMigros committed Dec 1, 2024
1 parent e30f030 commit 139c899
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/engraving/dom/noteline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ PropertyValue NoteLine::propertyDefault(Pid propertyId) const
PropertyValue NoteLine::getProperty(Pid propertyId) const
{
switch (propertyId) {
case Pid::PLAY:
return PropertyValue();
case Pid::PLACEMENT:
return PlacementV::ABOVE;
case Pid::NOTELINE_PLACEMENT:
Expand All @@ -179,6 +181,8 @@ PropertyValue NoteLine::getProperty(Pid propertyId) const
bool NoteLine::setProperty(Pid propertyId, const PropertyValue& val)
{
switch (propertyId) {
case Pid::PLAY:
break;
case Pid::NOTELINE_PLACEMENT:
setLineEndPlacement(val.value<NoteLineEndPlacement>());
break;
Expand Down
19 changes: 18 additions & 1 deletion src/engraving/dom/textline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Sid TextLine::getPropertyStyle(Pid pid) const
// propertyDefault
//---------------------------------------------------------

engraving::PropertyValue TextLine::propertyDefault(Pid propertyId) const
PropertyValue TextLine::propertyDefault(Pid propertyId) const
{
switch (propertyId) {
case Pid::PLACEMENT:
Expand Down Expand Up @@ -293,6 +293,8 @@ bool TextLine::allowTimeAnchor() const
bool TextLine::setProperty(Pid id, const engraving::PropertyValue& v)
{
switch (id) {
case Pid::PLAY:
break;
case Pid::PLACEMENT:
setPlacement(v.value<PlacementV>());
break;
Expand All @@ -303,6 +305,21 @@ bool TextLine::setProperty(Pid id, const engraving::PropertyValue& v)
return true;
}

//---------------------------------------------------------
// getProperty
//---------------------------------------------------------

PropertyValue TextLine::getProperty(Pid id) const
{
switch (id) {
case Pid::PLAY:
return PropertyValue();
default:
break;
}
return TextLineBase::getProperty(id);
}

//---------------------------------------------------------
// undoChangeProperty
//---------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion src/engraving/dom/textline.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ class TextLine final : public TextLineBase
bool allowTimeAnchor() const override;

PropertyValue propertyDefault(Pid) const override;
bool setProperty(Pid propertyId, const PropertyValue&) override;
bool setProperty(Pid id, const PropertyValue&) override;
PropertyValue getProperty(Pid id) const override;
};
} // namespace mu::engraving
#endif

0 comments on commit 139c899

Please sign in to comment.