Skip to content

Commit

Permalink
fix #23296
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Oct 29, 2013
1 parent eb8daad commit 2ff541a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
13 changes: 3 additions & 10 deletions libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ void Score::upDown(bool up, UpDownMode mode)
while (note->tieBack())
note = note->tieBack()->startNote();
for (; note; note = note->tieFor() ? note->tieFor()->endNote() : 0) {
if (el.indexOf(note) == -1) {
if (!el.contains(note)) {
el.append(note);
if (tick == -1)
tick = note->chord()->tick();
Expand Down Expand Up @@ -2043,22 +2043,19 @@ void Score::cmd(const QAction* a)
upDown(false, UP_DOWN_DIATONIC);
else if (cmd == "move-up") {
setLayoutAll(false);
Element* el = selection().element(); // single selection
if (el && el->type() == Element::NOTE) {
Note* note = static_cast<Note*>(el);
moveUp(note->chord());
}
}
else if (cmd == "move-down") {
setLayoutAll(false);
Element* el = selection().element(); // single selection
if (el && el->type() == Element::NOTE) {
Note* note = static_cast<Note*>(el);
moveDown(note->chord());
}
}
else if (cmd == "up-chord") {
Element* el = selection().element(); // single selection
if (el && (el->type() == Element::NOTE || el->type() == Element::REST)) {
Element* e = upAlt(el);
if (e) {
Expand All @@ -2071,7 +2068,6 @@ void Score::cmd(const QAction* a)
setLayoutAll(false);
}
else if (cmd == "down-chord") {
Element* el = selection().element(); // single selection
if (el && (el->type() == Element::NOTE || el->type() == Element::REST)) {
Element* e = downAlt(el);
if (e) {
Expand All @@ -2084,7 +2080,6 @@ void Score::cmd(const QAction* a)
setLayoutAll(false);
}
else if (cmd == "top-chord" ) {
Element* el = selection().element(); // single selection
if (el && el->type() == Element::NOTE) {
Element* e = upAltCtrl(static_cast<Note*>(el));
if (e) {
Expand All @@ -2097,7 +2092,6 @@ void Score::cmd(const QAction* a)
setLayoutAll(false);
}
else if (cmd == "bottom-chord") {
Element* el = selection().element(); // single selection
if (el && el->type() == Element::NOTE) {
Element* e = downAltCtrl(static_cast<Note*>(el));
if (e) {
Expand Down Expand Up @@ -2272,9 +2266,8 @@ void Score::cmd(const QAction* a)
else
type = LayoutBreak::SECTION;

Element* e = selection().element();
if (e && e->type() == Element::BAR_LINE && e->parent()->type() == Element::SEGMENT) {
Measure* measure = static_cast<Measure*>(e->parent()->parent());
if (el && el->type() == Element::BAR_LINE && el->parent()->type() == Element::SEGMENT) {
Measure* measure = static_cast<Measure*>(el->parent()->parent());
if (measure->isMMRest()) {
// if measure is mm rest, then propagate to last original measure
measure = measure->nextMeasure();
Expand Down
1 change: 1 addition & 0 deletions libmscore/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ void Score::repitchNote(const Position& p, bool replace)
undoRemoveElement(chord->notes().first());
}
undoAddElement(note);
select(note);
// move to next Chord
ChordRest* next = nextChordRest(_is.cr());
while(next && next->type() != Element::CHORD)
Expand Down

0 comments on commit 2ff541a

Please sign in to comment.