Skip to content

Commit

Permalink
Fix small bug on #5848 (#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 authored Mar 6, 2021
1 parent ea295c4 commit 7aa30c4
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 7aa30c4

Please sign in to comment.