From 6ff077af375dbd9fe2ee7ab4a1a8f426c1c514a0 Mon Sep 17 00:00:00 2001 From: Andreya-Autumn <105538426+Andreya-Autumn@users.noreply.github.com> Date: Sun, 26 Nov 2023 22:43:25 +0100 Subject: [PATCH] Prevent Formula Duplication on Undo (#7338) Closes #7336 --- src/surge-xt/gui/overlays/LuaEditors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/surge-xt/gui/overlays/LuaEditors.cpp b/src/surge-xt/gui/overlays/LuaEditors.cpp index 1bc91df5b43..6aa1282ad3c 100644 --- a/src/surge-xt/gui/overlays/LuaEditors.cpp +++ b/src/surge-xt/gui/overlays/LuaEditors.cpp @@ -791,7 +791,7 @@ void FormulaModulatorEditor::applyCode() void FormulaModulatorEditor::forceRefresh() { - mainDocument->insertText(0, formulastorage->formulaString); + mainDocument->replaceAllContent(formulastorage->formulaString); editor->repaintFrame(); }