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

Add methods to load/store TextEditState undoer #3479

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

LoganDark
Copy link
Contributor

This feels awful, @emilk why does this have to be an Arc?

Should the Arc be replaced with a new one when set_undoer is called, or should it just replace the undoer inside the Arc?

Closes #3436

This feels awful, @emilk why does this have to be an Arc?

Should the Arc be replaced with a new one when set_undoer is called,
or should it just replace the undoer inside the Arc?

Closes emilk#3436
@LoganDark LoganDark marked this pull request as draft October 17, 2023 01:08
@LoganDark
Copy link
Contributor Author

@emilk what are your thoughts on this? It's marked as draft just because I'm not sure what the final API design for this should be.

@emilk
Copy link
Owner

emilk commented Jan 7, 2024

Looks good to me. Why is it an Arc? The docstring explains it:

Wrapped in Arc for cheaper clones.

@LoganDark
Copy link
Contributor Author

Alright. I primarily wanted to use this to save and restore the undoer state in response to user input, so cloning the inner part of the Arc seems most correct to me.

@LoganDark LoganDark marked this pull request as ready for review January 7, 2024 16:14
@emilk emilk added the egui label Jan 7, 2024
@emilk emilk merged commit 327f599 into emilk:master Jan 7, 2024
19 of 20 checks passed
@LoganDark LoganDark deleted the set_undoer branch January 7, 2024 16:20
@emilk emilk changed the title add methods to manipulate TextEditState undoer Add methods to load/store TextEditState undoer Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for Clearing Functionality in TextEdit Undoer for Enhanced Data Security
2 participants