Skip to content

Commit

Permalink
Fix small bug on LMMS#5848 (LMMS#5933)
Browse files Browse the repository at this point in the history
m_gridMode was not being initialized on the PianoRoll
constructor. For that reason the first note drag without changing the
GridMode would result in m_gridMode being used unintialized and neither
the Snap nor Nudge mode being used. Here, the result of this was a note
being moved unquantized.
	This fixes it by calling changeSnapMode() after setting up the
snapModel on the constructor.
  • Loading branch information
IanCaio committed Mar 28, 2021
1 parent efb2d42 commit 6cf181a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ PianoRoll::PianoRoll() :
m_snapModel.addItem(tr("Nudge"));
m_snapModel.addItem(tr("Snap"));
m_snapModel.setValue(0);
changeSnapMode();
connect(&m_snapModel, SIGNAL(dataChanged()),
this, SLOT(changeSnapMode()));

Expand Down

0 comments on commit 6cf181a

Please sign in to comment.