Skip to content

Commit

Permalink
Manually merged #6511 to master
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly-os committed Sep 1, 2020
1 parent 345670d commit d594f0e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 2 additions & 3 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6287,10 +6287,9 @@ void MuseScore::transpose()
}

//---------------------------------------------------------
// cmdRealizeChordSymbols
// realizeChordSymbols
/// Realize selected chord symbols into notes on the staff.
/// Currently just pops up a dialog to list TPCs,
/// Intervals, and pitches.
/// Display dialog to offer overrides to default behavior
//---------------------------------------------------------

void MuseScore::realizeChordSymbols()
Expand Down
5 changes: 4 additions & 1 deletion mscore/propertymenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ void ScoreView::createElementPropertyMenu(Element* e, QMenu* popup)
genPropertyMenuText(e, popup);
} else if (e->isHarmony()) {
genPropertyMenu1(e, popup);
popup->addAction(getAction("realize-chord-symbols"));
QAction* a = getAction("realize-chord-symbols");
if (a) {
popup->addAction(a->text())->setData("realize-chord-symbols-dialog");
}
} else if (e->isTempoText()) {
genPropertyMenu1(e, popup);
} else if (e->isKeySig()) {
Expand Down
9 changes: 7 additions & 2 deletions mscore/scoreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,15 @@ void ScoreView::objectPopup(const QPoint& pos, Element* obj)
mscore->selectSimilarInRange(obj);
} else if (cmd == "select-dialog") {
mscore->selectElementDialog(obj);
} else if (cmd == "realize-chord-symbols") {
} else if (cmd == "realize-chord-symbols-dialog") {
if (obj->isEditable()) {
// try to construct a reasonable selection
if (obj->score()) {
obj->score()->select(obj, SelectType::ADD);
Score* score = obj->score();
if (score->selection().isRange()) {
mscore->selectSimilarInRange(obj);
}
score->select(obj, SelectType::ADD);
}
mscore->realizeChordSymbols();
}
Expand Down

0 comments on commit d594f0e

Please sign in to comment.