Skip to content

Commit

Permalink
fix #66776: V shortcut does not affect the ties and slurs which exten…
Browse files Browse the repository at this point in the history
…d on the following system
  • Loading branch information
lasconic committed Jun 27, 2015
1 parent d225ac2 commit 6ca10b3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions mscore/scoreview.cpp
Expand Up @@ -2990,19 +2990,25 @@ void ScoreView::cmd(const QAction* a)
}
else if (cmd == "toggle-visible") {
_score->startCmd();
foreach(Element* e, _score->selection().elements())
_score->undo(new ChangeProperty(e, P_ID::VISIBLE, !e->getProperty(P_ID::VISIBLE).toBool()));
QSet<Element*> spanners;
for (Element* e : _score->selection().elements()) {
bool spannerSegment = e->isSpannerSegment();
if (!spannerSegment || !spanners.contains(static_cast<SpannerSegment*>(e)->spanner()))
_score->undo(new ChangeProperty(e, P_ID::VISIBLE, !e->getProperty(P_ID::VISIBLE).toBool()));
if (spannerSegment)
spanners.insert(static_cast<SpannerSegment*>(e)->spanner());
}
_score->endCmd();
}
else if (cmd == "set-visible") {
_score->startCmd();
foreach(Element* e, _score->selection().elements())
for (Element* e : _score->selection().elements())
_score->undo(new ChangeProperty(e, P_ID::VISIBLE, true));
_score->endCmd();
}
else if (cmd == "unset-visible") {
_score->startCmd();
foreach(Element* e, _score->selection().elements())
for (Element* e : _score->selection().elements())
_score->undo(new ChangeProperty(e, P_ID::VISIBLE, false));
_score->endCmd();
}
Expand Down

0 comments on commit 6ca10b3

Please sign in to comment.