fix #277016: Change beahavior of reading GTP file with incomplete measure

This commit is contained in:
alexandr 2018-10-10 17:30:37 +02:00
parent 64d36533ad
commit b9522f5d44

View file

@ -1945,11 +1945,9 @@ void GuitarPro6::readBars(QDomNode* barList, Measure* measure, ClefType oldClefI
// deal with possible anacrusis
if (ticks < measure->ticks() && voiceNum == 0) {
int mticks = measure->ticks();
measure->setLen(Fraction::fromTicks(ticks));
int offset = mticks - measure->ticks();
for (Measure* m = measure->nextMeasure(); m; m = m->nextMeasure()) {
m->setTick(m->tick() - offset);
}
int tickOffSet = mticks - ticks;
int track = staffIdx * VOICES + voiceNum;
score->setRest(ticks + measure->tick(), track, Fraction::fromTicks(tickOffSet), true, nullptr, true);
}
}
}