Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #222181, fix #269998: Dotted rhythms within tuplets #3527

Merged
merged 1 commit into from Mar 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion libmscore/cmd.cpp
Expand Up @@ -962,7 +962,12 @@ QList<Fraction> Score::splitGapToMeasureBoundaries(ChordRest* cr, Fraction gap)
if (tuplet) {
if(tuplet->tuplet())
return flist; // do no deal with nested tuplets
Fraction rest = Fraction::fromTicks(tuplet->tick() + tuplet->duration().ticks() - cr->segment()->tick()) * tuplet->ratio();
Fraction rest = tuplet->elementsDuration();
for (DurationElement* de : tuplet->elements()) {
if (de == cr)
break;
rest -= de->duration();
}
if (rest < gap)
qDebug("does not fit in tuplet");
else
Expand Down
11 changes: 6 additions & 5 deletions libmscore/edit.cpp
Expand Up @@ -290,11 +290,12 @@ Rest* Score::setRest(int tick, int track, Fraction l, bool useDots, Tuplet* tupl
//
Fraction f;
if (tuplet) {
int ticks = (tuplet->tick() + tuplet->actualTicks()) - tick;

f = Fraction::fromTicks(ticks);
for (Tuplet* t = tuplet; t; t = t->tuplet())
f *= t->ratio();
f = tuplet->baseLen().fraction() * tuplet->ratio().numerator();
for (DurationElement* de : tuplet->elements()) {
if (de->tick() >= tick)
break;
f -= de->duration();
}
//
// restrict to tuplet len
//
Expand Down