Skip to content

Commit

Permalink
fix #113851 Placement of the multimeasure rests too high by default
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Jul 8, 2016
1 parent 3a795ca commit d56ea6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions libmscore/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3400,9 +3400,8 @@ void Measure::stretchMeasure(qreal targetWidth)
qreal w = x2 - x1 - 2 * d;

rest->setMMWidth(w);
StaffLines* sl = _mstaves[staffIdx]->lines;
qreal x = x1 - s.x() + d;
e->setPos(x, sl->staffHeight() * .5); // center vertically in measure
e->setPos(x, e->staff()->height() * .5); // center vertically in measure
rest->layout();
s.createShape(staffIdx);
}
Expand Down
6 changes: 3 additions & 3 deletions libmscore/rest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ void Rest::draw(QPainter* painter) const

painter->setPen(curColor());

if (parent() && measure() && measure()->isMMRest()) {
if (measure() && measure()->isMMRest()) {
//only on voice 1
if ((track() % VOICES) != 0)
if (track() % VOICES)
return;
Measure* m = measure();
int n = m->mmRestCount();
qreal pw = _spatium * .7;
qreal pw = _spatium * .7;
QPen pen(painter->pen());
pen.setWidthF(pw);
painter->setPen(pen);
Expand Down

0 comments on commit d56ea6e

Please sign in to comment.