fix scaling on flip

This commit is contained in:
Marc Sabatella 2019-04-11 07:24:48 -06:00
parent 812a2811b9
commit 93a7129f8e

View file

@ -295,8 +295,16 @@ void ScoreElement::undoChangeProperty(Pid id, const QVariant& v, PropertyFlags p
// first set property, then set offset for above/below if styled
changeProperties(this, id, v, ps);
if (isStyled(Pid::OFFSET))
ScoreElement::undoChangeProperty(Pid::OFFSET, score()->styleV(getPropertyStyle(Pid::OFFSET)).toPointF() * score()->spatium());
if (isStyled(Pid::OFFSET)) {
// TODO: maybe it just makes more sense to do this in Element::undoChangeProperty,
// but some of the overrides call ScoreElement explicitly
qreal sp;
if (isElement())
sp = toElement(this)->spatium();
else
sp = score()->spatium();
ScoreElement::undoChangeProperty(Pid::OFFSET, score()->styleV(getPropertyStyle(Pid::OFFSET)).toPointF() * sp);
}
doUpdateInspector = true;
}
else if (id == Pid::SUB_STYLE) {