Skip to content

Commit

Permalink
fix #40541: Slur across measures with whole notes causes an editing g…
Browse files Browse the repository at this point in the history
…litch in a score
  • Loading branch information
wschweer committed Dec 18, 2014
1 parent 729a788 commit 68a54f7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions libmscore/slur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void SlurSegment::changeAnchor(MuseScoreView* viewer, int curGrip, Element* elem
{
if (curGrip == int(GripSlurSegment::START)) {
spanner()->setStartElement(element);
switch(spanner()->anchor()) {
switch (spanner()->anchor()) {
case Spanner::Anchor::NOTE: {
Tie* tie = static_cast<Tie*>(spanner());
tie->startNote()->setTieFor(0);
Expand All @@ -216,7 +216,6 @@ void SlurSegment::changeAnchor(MuseScoreView* viewer, int curGrip, Element* elem
case Spanner::Anchor::CHORD:
spanner()->setTick(static_cast<Chord*>(element)->tick());
spanner()->setTrack(element->track());
spanner()->setStartElement(element);
break;
case Spanner::Anchor::SEGMENT:
case Spanner::Anchor::MEASURE:
Expand All @@ -226,7 +225,7 @@ void SlurSegment::changeAnchor(MuseScoreView* viewer, int curGrip, Element* elem
}
else {
spanner()->setEndElement(element);
switch(spanner()->anchor()) {
switch (spanner()->anchor()) {
case Spanner::Anchor::NOTE: {
Tie* tie = static_cast<Tie*>(spanner());
tie->endNote()->setTieBack(0);
Expand All @@ -237,7 +236,6 @@ void SlurSegment::changeAnchor(MuseScoreView* viewer, int curGrip, Element* elem
case Spanner::Anchor::CHORD:
spanner()->setTick2(static_cast<Chord*>(element)->tick());
spanner()->setTrack2(element->track());
spanner()->setEndElement(element);
break;

case Spanner::Anchor::SEGMENT:
Expand Down Expand Up @@ -379,8 +377,8 @@ void SlurSegment::editDrag(const EditData& ed)
ed.view->setDropTarget(note);
if (c != spanner->endCR()) {
changeAnchor(ed.view, ed.curGrip, c);
QPointF p1 = ed.pos - ups[ed.curGrip].p - canvasPos();
ups[ed.curGrip].off = p1 / _spatium;
// QPointF p1 = ed.pos - ups[ed.curGrip].p - canvasPos();
// ups[ed.curGrip].off = p1 / _spatium;
slurTie()->layout();
}
}
Expand Down

0 comments on commit 68a54f7

Please sign in to comment.