Skip to content

Commit

Permalink
fix #33661
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Sep 29, 2014
1 parent 74065ff commit acc5b3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions libmscore/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2410,12 +2410,11 @@ void Score::checkSpanner(int startTick, int endTick)
// DEBUG: check all spanner
// there may be spanners outside of score bc. some measures were deleted

int lastTick = lastMeasure()->endTick();

for (auto i : _spanner.map()) {
// Spanner* s = i->value;
Spanner* s = i.second;

// printf(" %s %d %d\n", s->name(), s->tick(), s->tick2());

if (s->type() == Element::Type::SLUR) {
Segment* seg = tick2segmentMM(s->tick(), false, Segment::Type::ChordRest);
if (!seg || !seg->element(s->track()))
Expand All @@ -2429,6 +2428,8 @@ void Score::checkSpanner(int startTick, int endTick)
s->computeStartElement();
if (!s->startElement())
sl.append(s);
if (s->tick2() > lastTick)
s->undoChangeProperty(P_ID::SPANNER_TICKS, lastTick - s->tick());
}
}
for (auto s : sl) // actually remove scheduled spanners
Expand Down
3 changes: 1 addition & 2 deletions libmscore/line.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,8 @@ QPointF SLine::linePos(GripLine grip, System** sys) const
Measure* m = sm;
if (sm->hasMMRest())
m = sm->mmRest();
while (m->endTick() < tick2()) {
while (m->nextMeasureMM() && (m->endTick() < tick2()))
m = m->nextMeasureMM();
}
x = m->pos().x() + m->bbox().right();
}
Segment* seg = m->last();
Expand Down

0 comments on commit acc5b3b

Please sign in to comment.