Skip to content

Commit

Permalink
Two bug fixes (recorded notes position and length were wrong on speci…
Browse files Browse the repository at this point in the history
…fic cases)

1. length of new notes was wrong when current step was already in a size of multiply of steps.

2. recorded notes start-position was not updated correctly after moving cursor backwards
  • Loading branch information
Mister-Lemon committed Sep 17, 2018
1 parent 98c43a4 commit d4fee61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/StepRecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void StepRecorder::notePressed(const Note & n)
StepNote* stepNote = findCurStepNote(n.key());
if(stepNote == nullptr)
{
m_curStepNotes.append(new StepNote(Note(m_stepsLength, m_curStepStartPos, n.key(), n.getVolume(), n.getPanning())));
m_curStepNotes.append(new StepNote(Note(m_curStepLength, m_curStepStartPos, n.key(), n.getVolume(), n.getPanning())));
m_pianoRoll.update();
}
else if (stepNote->isReleased())
Expand Down Expand Up @@ -328,6 +328,7 @@ void StepRecorder::updateCurStepNotes()
for (StepNote* stepNote : m_curStepNotes)
{
stepNote->m_note.setLength(m_curStepLength);
stepNote->m_note.setPos(m_curStepStartPos);
}
}

Expand Down

0 comments on commit d4fee61

Please sign in to comment.