diff --git a/src/app/RackWidget.cpp b/src/app/RackWidget.cpp index f8301de5..a7bf58be 100644 --- a/src/app/RackWidget.cpp +++ b/src/app/RackWidget.cpp @@ -41,8 +41,10 @@ void RackWidget::clear() { } void RackWidget::reset() { - clear(); - loadPatch(assetLocal("template.vcv")); + if (osdialog_message(OSDIALOG_INFO, OSDIALOG_OK_CANCEL, "Clear your patch and start over?")) { + clear(); + loadPatch(assetLocal("template.vcv")); + } } void RackWidget::openDialog() { diff --git a/src/app/SVGSwitch.cpp b/src/app/SVGSwitch.cpp index 5b66518d..eda234cc 100644 --- a/src/app/SVGSwitch.cpp +++ b/src/app/SVGSwitch.cpp @@ -24,7 +24,8 @@ void SVGSwitch::step() { void SVGSwitch::onChange(EventChange &e) { assert(frames.size() > 0); - int index = clampi((int) roundf(value), 0, frames.size() - 1); + float valueScaled = rescalef(value, minValue, maxValue, 0, frames.size() - 1); + int index = clampi((int) roundf(valueScaled), 0, frames.size() - 1); sw->setSVG(frames[index]); dirty = true; Switch::onChange(e);