add Measure->endBarLineType() method
This commit is contained in:
parent
d68ac1e9b1
commit
a97b1db29c
3 changed files with 30 additions and 0 deletions
|
@ -3419,5 +3419,31 @@ void Measure::removeSystemTrailer()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// endBarLineType
|
||||
// Assume all barlines have same type if there is more
|
||||
// than one.
|
||||
//---------------------------------------------------------
|
||||
|
||||
BarLineType Measure::endBarLineType() const
|
||||
{
|
||||
// search barline segment:
|
||||
|
||||
Segment* s = last();
|
||||
while (s && s->segmentType() != Segment::Type::EndBarLine)
|
||||
s = s->prev();
|
||||
|
||||
// search first element
|
||||
|
||||
if (s) {
|
||||
for (const Element* e : s->elist()) {
|
||||
if (e)
|
||||
return toBarLine(e)->barLineType();
|
||||
}
|
||||
}
|
||||
return BarLineType::NORMAL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -263,6 +263,8 @@ class Measure : public MeasureBase {
|
|||
|
||||
void removeSystemHeader();
|
||||
void removeSystemTrailer();
|
||||
|
||||
BarLineType endBarLineType() const;
|
||||
};
|
||||
|
||||
} // namespace Ms
|
||||
|
|
|
@ -1406,6 +1406,8 @@ qreal Segment::minHorizontalDistance(Segment* ns) const
|
|||
else if (st == Segment::Type::Clef) {
|
||||
if (nst == Segment::Type::KeySig)
|
||||
w += score()->styleP(StyleIdx::clefKeyDistance);
|
||||
else if (nst == Segment::Type::ChordRest)
|
||||
w += score()->styleP(StyleIdx::keyTimesigDistance);
|
||||
else if (nst == Segment::Type::TimeSig)
|
||||
w += score()->styleP(StyleIdx::clefTimesigDistance);
|
||||
else if (nst & (Segment::Type::EndBarLine | Segment::Type::StartRepeatBarLine))
|
||||
|
|
Loading…
Reference in a new issue