Skip to content

Commit

Permalink
fix #20970 : Glissando collides with elements before note
Browse files Browse the repository at this point in the history
  • Loading branch information
Dag Henning Liodden Sørbø authored and wschweer committed May 15, 2013
1 parent 63cd890 commit 7bd99b1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libmscore/glissando.cpp
Expand Up @@ -10,6 +10,7 @@
// the file LICENCE.GPL
//=============================================================================

#include "arpeggio.h"
#include "glissando.h"
#include "chord.h"
#include "note.h"
Expand Down Expand Up @@ -94,6 +95,14 @@ void Glissando::layout()
y1 += yOff; // move starting point to base of note
}

// shorten line so it doesn't go through accidential or arpeggio
if (Accidental* a = anchor2->accidental()) {
x2 = a->pos().x() + a->userOff().x();
}
if (Arpeggio* a = chord->arpeggio()) {
x2 = a->pos().x() + a->userOff().x();
}

QLineF fullLine(x1, y1, x2, y2);

// shorten line on each side by offsets
Expand Down

0 comments on commit 7bd99b1

Please sign in to comment.