Merge pull request #4358 from dmitrio95/selection-copy-fixup
fix #279662: fixup for aeb4919e77
This commit is contained in:
commit
29165bbab5
3 changed files with 4 additions and 4 deletions
|
@ -1254,7 +1254,7 @@ void Score::cmdAddTie(bool addToChord)
|
|||
|
||||
void Score::cmdAddOttava(OttavaType type)
|
||||
{
|
||||
const Selection& sel = selection();
|
||||
const Selection sel = selection(); // copy selection state before the operation.
|
||||
// add on each staff if possible
|
||||
if (sel.isRange() && sel.staffStart() != sel.staffEnd() - 1) {
|
||||
for (int staffIdx = sel.staffStart() ; staffIdx < sel.staffEnd(); ++staffIdx) {
|
||||
|
|
|
@ -456,7 +456,7 @@ void Palette::applyPaletteElement(PaletteCell* cell, Qt::KeyboardModifiers modif
|
|||
Score* score = mscore->currentScore();
|
||||
if (score == 0)
|
||||
return;
|
||||
const Selection& sel = score->selection(); // make a copy of the list
|
||||
const Selection sel = score->selection(); // make a copy of selection state before applying the operation.
|
||||
if (sel.isNone())
|
||||
return;
|
||||
|
||||
|
|
|
@ -3332,8 +3332,7 @@ void ScoreView::cmdAddNoteLine()
|
|||
void ScoreView::cmdChangeEnharmonic(bool both)
|
||||
{
|
||||
_score->startCmd();
|
||||
Selection& selection = _score->selection();
|
||||
QList<Note*> notes = selection.uniqueNotes();
|
||||
QList<Note*> notes = _score->selection().uniqueNotes();
|
||||
for (Note* n : notes) {
|
||||
Staff* staff = n->staff();
|
||||
if (staff->part()->instrument()->useDrumset())
|
||||
|
@ -3394,6 +3393,7 @@ void ScoreView::cmdChangeEnharmonic(bool both)
|
|||
}
|
||||
}
|
||||
|
||||
Selection& selection = _score->selection();
|
||||
selection.clear();
|
||||
for (Note* n : notes)
|
||||
selection.add(n);
|
||||
|
|
Loading…
Reference in a new issue