Skip to content

Commit

Permalink
Ensuring we cleanly switch measures
Browse files Browse the repository at this point in the history
  • Loading branch information
Rcomian committed Dec 11, 2018
1 parent ce1f16d commit 9befbe3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PianoRollModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@ struct PianoRollWidget : ModuleWidget {
this->lowestDisplayNote = clamp(this->lowestDisplayNote - 12, -1 * 12, 8 * 12);
} else if (e.button == 0 && std::get<0>(measureSwitch)) {
this->currentMeasure = std::get<1>(measureSwitch);
lastDrawnStep = module->currentStep;
} else {
ModuleWidget::onMouseDown(e);
}
Expand Down Expand Up @@ -1217,9 +1218,9 @@ void PlayPositionDragging::onDragMove(EventDragMove& e) {
}

if (beatDivFound) {
info("Beat div found: %d", cellBeatDiv.num);
module->currentStep = cellBeatDiv.num + (module->getDivisionsPerMeasure() * widget->currentMeasure);
module->auditionStep = cellBeatDiv.num + (module->getDivisionsPerMeasure() * widget->currentMeasure);
widget->lastDrawnStep = module->currentStep;
} else {
module->auditionStep = -1;
}
Expand Down

0 comments on commit 9befbe3

Please sign in to comment.