From ace6870add339c7514de28385229e13820e8d559 Mon Sep 17 00:00:00 2001 From: Marc Sabatella Date: Tue, 7 Oct 2014 22:54:39 -0600 Subject: [PATCH] fix #30796: pedal endpoint on last note of score --- libmscore/line.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libmscore/line.cpp b/libmscore/line.cpp index 8b41c62d82..c8fe83e96e 100644 --- a/libmscore/line.cpp +++ b/libmscore/line.cpp @@ -202,6 +202,13 @@ bool LineSegment::edit(MuseScoreView* sv, int curGrip, int key, Qt::KeyboardModi if (l->anchor() == Spanner::Anchor::SEGMENT) { Segment* s1 = spanner()->startSegment(); Segment* s2 = spanner()->endSegment(); + // check for line going to end of score + if (spanner()->tick2() >= score()->lastSegment()->tick()) { + // endSegment calculated above will be the last chord/rest of score + // but that is not correct - it should be an imaginary note *after* the end of the score + // best we can do is set s2 to lastSegment (probably the end barline) + s2 = score()->lastSegment(); + } if (!s1 && !s2) { qDebug("LineSegment::edit: no start/end segment"); return true;