Skip to content
Permalink
Browse files

fix #289374: tuplet numbers: 'follow staff size' not working

  • Loading branch information...
jthistle committed May 19, 2019
1 parent 5c51800 commit 4e91c67f15228552bcc40d624fa4bc25ce73d677
Showing with 152 additions and 138 deletions.
  1. +1 −1 libmscore/read206.cpp
  2. +6 −1 libmscore/tuplet.cpp
  3. +2 −1 mscore/inspector/inspector.cpp
  4. +143 −135 mscore/inspector/inspector_tuplet.ui
@@ -1749,7 +1749,7 @@ static void readTuplet(Tuplet* tuplet, XmlReader& e)
_number->setVisible(tuplet->visible()); //?? override saved property
_number->setTrack(tuplet->track());
// move property flags from _number
for (auto p : { Pid::FONT_FACE, Pid::FONT_SIZE, Pid::FONT_STYLE, Pid::ALIGN })
for (auto p : { Pid::FONT_FACE, Pid::FONT_SIZE, Pid::FONT_STYLE, Pid::ALIGN, Pid::SIZE_SPATIUM_DEPENDENT })
tuplet->setPropertyFlags(p, _number->propertyFlags(p));
}
else if (!readTupletProperties206(e, tuplet))
@@ -41,6 +41,7 @@ static const ElementStyle tupletStyle {
{ Sid::tupletFontStyle, Pid::FONT_STYLE },
{ Sid::tupletAlign, Pid::ALIGN },
{ Sid::tupletMinDistance, Pid::MIN_DISTANCE },
{ Sid::tupletFontSpatiumDependent, Pid::SIZE_SPATIUM_DEPENDENT },
};

//---------------------------------------------------------
@@ -150,7 +151,7 @@ Fraction Tuplet::rtick() const

void Tuplet::resetNumberProperty()
{
for (auto p : { Pid::FONT_FACE, Pid::FONT_STYLE, Pid::FONT_SIZE, Pid::ALIGN })
for (auto p : { Pid::FONT_FACE, Pid::FONT_STYLE, Pid::FONT_SIZE, Pid::ALIGN, Pid::SIZE_SPATIUM_DEPENDENT })
_number->resetProperty(p);
}

@@ -1064,6 +1065,7 @@ QVariant Tuplet::getProperty(Pid propertyId) const
case Pid::FONT_FACE:
case Pid::FONT_STYLE:
case Pid::ALIGN:
case Pid::SIZE_SPATIUM_DEPENDENT:
return _number ? _number->getProperty(propertyId) : QVariant();
default:
break;
@@ -1106,6 +1108,7 @@ bool Tuplet::setProperty(Pid propertyId, const QVariant& v)
case Pid::FONT_FACE:
case Pid::FONT_STYLE:
case Pid::ALIGN:
case Pid::SIZE_SPATIUM_DEPENDENT:
if (_number)
_number->setProperty(propertyId, v);
break;
@@ -1146,6 +1149,8 @@ QVariant Tuplet::propertyDefault(Pid id) const
return score()->styleV(Sid::tupletFontSize);
case Pid::FONT_STYLE:
return score()->styleV(Sid::tupletFontStyle);
case Pid::SIZE_SPATIUM_DEPENDENT:
return score()->styleV(Sid::tupletFontSpatiumDependent);
default:
{
QVariant v = ScoreElement::propertyDefault(id, Tid::DEFAULT);
@@ -844,7 +844,8 @@ InspectorTuplet::InspectorTuplet(QWidget* parent)
{ Pid::DIRECTION, 0, t.direction, t.resetDirection },
{ Pid::NUMBER_TYPE, 0, t.numberType, t.resetNumberType },
{ Pid::BRACKET_TYPE, 0, t.bracketType, t.resetBracketType },
{ Pid::LINE_WIDTH, 0, t.lineWidth, t.resetLineWidth }
{ Pid::LINE_WIDTH, 0, t.lineWidth, t.resetLineWidth },
{ Pid::SIZE_SPATIUM_DEPENDENT, 0, t.spatiumDependent, t.resetSpatiumDependent },
};
const std::vector<InspectorPanel> ppList = { {t.title, t.panel} };
mapSignals(iiList, ppList);

0 comments on commit 4e91c67

Please sign in to comment.
You can’t perform that action at this time.