Skip to content

Commit

Permalink
fix #73821: toggle rhythmic slash notation does not follow links
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella authored and lasconic committed Aug 19, 2015
1 parent 221c482 commit b60aafc
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2836,7 +2836,7 @@ void Score::cmdSlashFill()
s = setNoteRest(s, track + voice, nv, f);
Chord* c = static_cast<Chord*>(s->element(track + voice));
if (c->links()) {
foreach (ScoreElement* e, *c->links()) {
for (ScoreElement* e : *c->links()) {
Chord* lc = static_cast<Chord*>(e);
lc->setSlash(true, true);
}
Expand Down Expand Up @@ -2870,7 +2870,14 @@ void Score::cmdSlashRhythm()
foreach (Element* e, selection().elements()) {
if (e->voice() >= 2 && e->type() == Element::Type::REST) {
Rest* r = static_cast<Rest*>(e);
r->setAccent(!r->accent());
if (r->links()) {
for (ScoreElement* e : *r->links()) {
Rest* lr = static_cast<Rest*>(e);
lr->setAccent(!lr->accent());
}
}
else
r->setAccent(!r->accent());
continue;
}
else if (e->type() == Element::Type::NOTE) {
Expand All @@ -2883,7 +2890,14 @@ void Score::cmdSlashRhythm()
continue;
chords.append(c);
// toggle slash setting
c->setSlash(!c->slash(), false);
if (c->links()) {
for (ScoreElement* e : *c->links()) {
Chord* lc = static_cast<Chord*>(e);
lc->setSlash(!lc->slash(), false);
}
}
else
c->setSlash(!c->slash(), false);
}
}
setLayoutAll(true);
Expand Down

0 comments on commit b60aafc

Please sign in to comment.