fix tuplet skyline
This commit is contained in:
parent
58618db581
commit
1a0d4d7d20
3 changed files with 27 additions and 25 deletions
|
@ -3233,6 +3233,29 @@ System* Score::collectSystem(LayoutContext& lc)
|
|||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// layout tuplet
|
||||
//-------------------------------------------------------------
|
||||
|
||||
for (Segment* s : sl) {
|
||||
for (int track = 0; track < score()->ntracks(); ++track) {
|
||||
if (!score()->staff(track / VOICES)->show()) {
|
||||
track += VOICES-1;
|
||||
continue;
|
||||
}
|
||||
ChordRest* cr = s->cr(track);
|
||||
if (!cr)
|
||||
continue;
|
||||
DurationElement* de = cr;
|
||||
while (de->tuplet() && de->tuplet()->elements().front() == de) {
|
||||
Tuplet* t = de->tuplet();
|
||||
t->layout();
|
||||
system->staff(t->staffIdx())->skyline().add(t->shape().translated(t->measure()->pos()));
|
||||
de = de->tuplet();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// layout slurs
|
||||
//-------------------------------------------------------------
|
||||
|
@ -3306,29 +3329,6 @@ System* Score::collectSystem(LayoutContext& lc)
|
|||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// layout tuplet
|
||||
//-------------------------------------------------------------
|
||||
|
||||
for (Segment* s : sl) {
|
||||
for (int track = 0; track < score()->ntracks(); ++track) {
|
||||
if (!score()->staff(track / VOICES)->show()) {
|
||||
track += VOICES-1;
|
||||
continue;
|
||||
}
|
||||
ChordRest* cr = s->cr(track);
|
||||
if (!cr)
|
||||
continue;
|
||||
DurationElement* de = cr;
|
||||
while (de->tuplet() && de->tuplet()->elements().front() == de) {
|
||||
Tuplet* t = de->tuplet();
|
||||
t->layout();
|
||||
system->staff(t->staffIdx())->skyline().add(t->shape());
|
||||
de = de->tuplet();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add dynamics shape to skyline
|
||||
|
||||
for (Dynamic* d : dynamics) {
|
||||
|
|
|
@ -3231,6 +3231,7 @@ void Note::setAccidentalType(AccidentalType type)
|
|||
|
||||
Shape Note::shape() const
|
||||
{
|
||||
// printf("===note %f %f %f %f posy %f\n", bbox().x(), bbox().y(), bbox().width(), bbox().height(), pos().y());
|
||||
#ifndef NDEBUG
|
||||
Shape shape(bbox(), name());
|
||||
for (NoteDot* dot : _dots)
|
||||
|
|
|
@ -192,9 +192,10 @@ void Skyline::paint(QPainter& p) const
|
|||
p.save();
|
||||
|
||||
p.setBrush(Qt::NoBrush);
|
||||
p.setPen(QPen(QBrush(Qt::darkYellow), 0.8));
|
||||
QMatrix matrix = p.matrix();
|
||||
p.setPen(QPen(QBrush(Qt::darkYellow), 2.0 / matrix.m11()));
|
||||
_north.paint(p);
|
||||
p.setPen(QPen(QBrush(Qt::green), 0.8));
|
||||
p.setPen(QPen(QBrush(Qt::green), 2.0 / matrix.m11()));
|
||||
_south.paint(p);
|
||||
p.restore();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue