Skip to content

Commit

Permalink
fix #23304
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Oct 29, 2013
1 parent 85e2839 commit 6aacf5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions libmscore/undo.cpp
Expand Up @@ -1196,15 +1196,13 @@ void Score::undoRemoveElement(Element* element)
QList<Segment*> segments;
foreach (Element* e, element->linkList()) {
undo(new RemoveElement(e));
//if (e->type() == Element::KEYSIG) // TODO: should be done in undo()/redo()
// e->score()->cmdUpdateNotes();
if (!e->isChordRest() && e->parent() && (e->parent()->type() == Element::SEGMENT)) {
Segment* s = static_cast<Segment*>(e->parent());
if (!segments.contains(s))
segments.append(s);
}
}
foreach(Segment* s, segments) {
for (Segment* s : segments) {
if (s->isEmpty())
undo(new RemoveElement(s));
}
Expand Down
6 changes: 4 additions & 2 deletions mscore/musescore.cpp
Expand Up @@ -2714,7 +2714,7 @@ void MuseScore::readSettings()

void MuseScore::play(Element* e) const
{
if (!mscore->playEnabled())
if (noSeq || !mscore->playEnabled())
return;

if (e->type() == Element::NOTE) {
Expand All @@ -2738,6 +2738,8 @@ void MuseScore::play(Element* e) const

void MuseScore::play(Element* e, int pitch) const
{
if (noSeq)
return;
if (mscore->playEnabled() && e->type() == Element::NOTE) {
Note* note = static_cast<Note*>(e);
int tick = note->chord()->tick();
Expand Down Expand Up @@ -3937,7 +3939,7 @@ void MuseScore::endCmd()
excerptsChanged(cs->rootScore());
cs->rootScore()->setExcerptsChanged(false);
}
if (cs->instrumentsChanged()) {
if (!noSeq && cs->instrumentsChanged()) {
seq->initInstruments();
cs->setInstrumentsChanged(false);
}
Expand Down

0 comments on commit 6aacf5a

Please sign in to comment.