Improve strum tool LMB event (#8195)

This commit is contained in:
Dalton Messmer
2026-01-08 13:52:39 -05:00
committed by GitHub
parent d4cabd5650
commit 248acbf9a4

View File

@@ -1666,8 +1666,7 @@ void PianoRoll::mousePressEvent(QMouseEvent * me )
if (m_editMode == EditMode::Strum && me->button() == Qt::LeftButton)
{
// Only strum if the user is dragging a selected note
const auto& selectedNotes = getSelectedNotes();
if (std::find(selectedNotes.begin(), selectedNotes.end(), noteUnderMouse()) != selectedNotes.end())
if (Note* note = noteUnderMouse(); note && note->selected())
{
updateStrumPos(me, true, me->modifiers() & Qt::ShiftModifier);
m_strumEnabled = true;