From 7bd99b178e7fd013630e64d39bf7d86cf22a8325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag=20Henning=20Liodden=20S=C3=B8rb=C3=B8?= Date: Mon, 13 May 2013 21:09:04 +0200 Subject: [PATCH] fix #20970 : Glissando collides with elements before note --- libmscore/glissando.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libmscore/glissando.cpp b/libmscore/glissando.cpp index d6349f00ac91..22304315a54e 100644 --- a/libmscore/glissando.cpp +++ b/libmscore/glissando.cpp @@ -10,6 +10,7 @@ // the file LICENCE.GPL //============================================================================= +#include "arpeggio.h" #include "glissando.h" #include "chord.h" #include "note.h" @@ -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