Add disabled undo & redo buttons for when there is nothing to undo/redo #256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When there is nothing to undo, the undo button grays out. When there is nothing to redo, the redo button grays out.
The buttons are updated correctly when creating a new file or when going to a different tab.
This is only a visual change. Hovering over the buttons still shows a hint, and clicking on them still makes them do their thing.
Note: this does not behave as expected when the user zooms in/out. For some reason, zooming in/out marks a project as "dirty", which enables the undo button as a result. I've decided to ignore this because zooming in/out shouldn't mark a project as "dirty" in the first place (please correct me if I'm wrong)
Also, I know this project is currently being updated to Godot 4: I don't mind waiting and rewriting the PR after that's done.
(This is kinda my first PR, sorry if I screwed something up)