From 15b84159d419ea12ff0c04a52feecd2789014fb0 Mon Sep 17 00:00:00 2001 From: David Lowndes Date: Sun, 17 Nov 2024 19:52:09 +0000 Subject: [PATCH] A floating point value was truncated to an int and then compared to 0.5 - seems wrong! Just compare the float value itself. --- src/surge-xt/gui/overlays/LuaEditors.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/surge-xt/gui/overlays/LuaEditors.cpp b/src/surge-xt/gui/overlays/LuaEditors.cpp index 1b04ba32788..6d5a253b68e 100644 --- a/src/surge-xt/gui/overlays/LuaEditors.cpp +++ b/src/surge-xt/gui/overlays/LuaEditors.cpp @@ -671,9 +671,7 @@ struct FormulaControlArea : public juce::Component, { case tag_select_tab: { - int m = c->getValue(); - - if (m > 0.5) + if (c->getValue() > 0.5) { overlay->showPreludeCode(); } @@ -1446,9 +1444,7 @@ struct WavetableScriptControlArea : public juce::Component, { case tag_select_tab: { - int m = c->getValue(); - - if (m > 0.5) + if (c->getValue() > 0.5) { overlay->showPreludeCode(); }