From 6a230ff06755db9536f18ebeca38dedc28d9d5aa Mon Sep 17 00:00:00 2001 From: Marc Sabatella Date: Sun, 8 Mar 2015 18:59:07 -0600 Subject: [PATCH] fix #50006: beam editing issues --- libmscore/beam.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libmscore/beam.cpp b/libmscore/beam.cpp index 93ce14b989..45edc23c87 100644 --- a/libmscore/beam.cpp +++ b/libmscore/beam.cpp @@ -1511,6 +1511,7 @@ void Beam::layout2(QListcrl, SpannerSegmentType, int frag) // // set stem direction for every chord // + bool relayoutGrace = false; for (int i = 0; i < n; ++i) { Chord* c = static_cast(crl.at(i)); if (c->type() == Element::Type::REST) @@ -1521,10 +1522,18 @@ void Beam::layout2(QListcrl, SpannerSegmentType, int frag) if (c->up() != nup) { c->setUp(nup); // guess was wrong, have to relayout - score()->layoutChords1(c->segment(), c->staffIdx()); + if (!_isGrace) { + score()->layoutChords1(c->segment(), c->staffIdx()); + } + else { + relayoutGrace = true; + score()->layoutChords3(c->notes(), c->staff(), 0); + } } } _up = crl.front()->up(); + if (relayoutGrace) + c1->parent()->layout(); } else if (_cross) { qreal beamY = 0.0; // y position of main beam start @@ -2117,6 +2126,8 @@ void Beam::reset() void Beam::startEdit(MuseScoreView*, const QPointF& p) { undoPushProperty(P_ID::BEAM_POS); + undoPushProperty(P_ID::USER_MODIFIED); + undoPushProperty(P_ID::GENERATED); QPointF pt(p - pagePos()); qreal ydiff = 100000000.0;