-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 redo to Undoer #3447
Comments
Closed
YgorSouza
added a commit
to YgorSouza/egui
that referenced
this issue
Oct 11, 2023
Closes emilk#3447
LoganDark
added a commit
to LoganDark/egui
that referenced
this issue
Oct 17, 2023
LoganDark
added a commit
to LoganDark/egui
that referenced
this issue
Oct 17, 2023
LoganDark
added a commit
to LoganDark/egui
that referenced
this issue
Oct 17, 2023
LoganDark
added a commit
to LoganDark/egui
that referenced
this issue
Oct 17, 2023
emilk
pushed a commit
that referenced
this issue
Nov 10, 2023
I'm the author of the PR that just landed to close this. Seems like just laziness :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The
Undoer
does not have a redo functionality, and thus neither does theTextEdit
. most text boxes that have undo also have redo, and there is a TODO for it in the source code.egui/crates/egui/src/widgets/text_edit/builder.rs
Lines 987 to 988 in 38b4234
Describe the solution you'd like
The
Undoer
should push undone states to a redo stack, and have aredo()
method that can be called to revert theundo()
call, as well as ahas_redo()
method to help set the enabled/disable state for the corresponding UI button.Describe alternatives you've considered
It might be possible to check the state of
has_undo()
before and after callingfeed_state()
oradd_undo()
, and push a state to a redo stack stored separately, but that seems complicated and error-prone, and this feature is needed for theTextEdit
anyway, so it may as well be provided by theUndoer
.Additional context
I am willing to try to implement this feature myself, but I would like to know if there are any pitfalls I should consider, that might have prevented it from being implemented until now.
The text was updated successfully, but these errors were encountered: