Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formula Undo is borked #7336

Closed
Andreya-Autumn opened this issue Nov 26, 2023 · 3 comments
Closed

Formula Undo is borked #7336

Andreya-Autumn opened this issue Nov 26, 2023 · 3 comments
Labels
Bug Report Item submitted using the Bug Report template
Milestone

Comments

@Andreya-Autumn
Copy link
Collaborator

Load formula.
Change something and apply.
Undo with the editor open.

You get the previous formula back, working correctly. But the editor window has two copies of the code in it, with the second one not applied. Close the editor and reopen and you're fine, but press apply before that and you get an error obviously.

Likely related to #7310

@Andreya-Autumn Andreya-Autumn added the Bug Report Item submitted using the Bug Report template label Nov 26, 2023
@Andreya-Autumn Andreya-Autumn added this to the Surge XT 1.3 milestone Nov 26, 2023
@baconpaul
Copy link
Collaborator

void FormulaModulatorEditor::forceRefresh()
{
mainDocument->insertText(0, formulastorage->formulaString);
editor->repaintFrame();
}

That should remove all the text before inserting else the double copy.

main document clear as first line of that fn basically

@baconpaul
Copy link
Collaborator

Am on phone otherwise would do obvs. Good catch

@Andreya-Autumn
Copy link
Collaborator Author

->replaceAllContent seems to work fine too. PR coming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Item submitted using the Bug Report template
Projects
None yet
Development

No branches or pull requests

2 participants