From 9befbe33167a802f3a4400cb16aecebaa843e44b Mon Sep 17 00:00:00 2001 From: Jim Tupper Date: Tue, 11 Dec 2018 22:51:59 +0000 Subject: [PATCH] Ensuring we cleanly switch measures --- src/PianoRollModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PianoRollModule.cpp b/src/PianoRollModule.cpp index c0fc70f..d9ef4c4 100644 --- a/src/PianoRollModule.cpp +++ b/src/PianoRollModule.cpp @@ -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); } @@ -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; }