fix #13403
This commit is contained in:
parent
e11bdd35e6
commit
dae6d6ebff
|
@ -474,7 +474,7 @@ void NotationActionController::init()
|
|||
registerTabPadNoteAction("pad-note-1024-TAB", Pad::NOTE1024);
|
||||
|
||||
for (int i = 0; i < MAX_FRET; ++i) {
|
||||
registerAction("fret-" + std::to_string(i), &Interaction::addFret, i, &Controller::isTablatureStaff);
|
||||
registerAction("fret-" + std::to_string(i), [i, this]() { addFret(i); }, &Controller::isTablatureStaff);
|
||||
}
|
||||
|
||||
// listen on state changes
|
||||
|
@ -1140,6 +1140,17 @@ void NotationActionController::addSlur()
|
|||
}
|
||||
}
|
||||
|
||||
void NotationActionController::addFret(int num)
|
||||
{
|
||||
auto interaction = currentNotationInteraction();
|
||||
if (!interaction) {
|
||||
return;
|
||||
}
|
||||
|
||||
interaction->addFret(num);
|
||||
playSelectedElement(currentNotationElements()->msScore()->playChord());
|
||||
}
|
||||
|
||||
IInteractive::Result NotationActionController::showErrorMessage(const std::string& message) const
|
||||
{
|
||||
return interactive()->info(message,
|
||||
|
@ -1843,6 +1854,10 @@ void NotationActionController::playSelectedElement(bool playChord)
|
|||
}
|
||||
|
||||
playbackController()->playElements({ element });
|
||||
|
||||
mu::engraving::Score* score = currentNotationElements()->msScore();
|
||||
score->setPlayChord(false);
|
||||
score->setPlayNote(false);
|
||||
}
|
||||
|
||||
void NotationActionController::startNoteInputIfNeed()
|
||||
|
|
|
@ -108,6 +108,7 @@ private:
|
|||
void addTie();
|
||||
void chordTie();
|
||||
void addSlur();
|
||||
void addFret(int num);
|
||||
|
||||
framework::IInteractive::Result showErrorMessage(const std::string& message) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue