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

Expose has_undo() and has_redo() of LineEdit #97167

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

MewPurPur
Copy link
Contributor

@MewPurPur MewPurPur commented Sep 18, 2024

Some progress towards godotengine/godot-proposals#9207.

When using LineEdit, you might want to make a custom context menu or other utility for Undo/Redo. One thing that makes this harder than it needs to be is the inability to easily tell if LineEdits can undo/redo, which makes it impossible to disable their corresponding buttons:

image

TextEdits already expose this.

@MewPurPur MewPurPur requested a review from a team as a code owner September 18, 2024 22:19
@MewPurPur MewPurPur requested a review from a team as a code owner September 18, 2024 22:22
@Mickeon Mickeon added this to the 4.x milestone Sep 18, 2024
Copy link
Contributor

@radiantgurl radiantgurl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont see any reason why it shouldn't be exposed

@AThousandShips
Copy link
Member

I think this might need a more clear name, has_undo would be easy to interpret as "as an undo/redo object attached", maybe has_undo/redo_action?

@MewPurPur
Copy link
Contributor Author

It's better to follow the TextEdit convention I think.

Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and makes sense for parity

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 20, 2024
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to expose. I agree with keeping the names consistent with TextEdit.

@akien-mga akien-mga changed the title Expose has_undo() and has_redo() of LineEdit Expose has_undo() and has_redo() of LineEdit Sep 20, 2024
@akien-mga akien-mga merged commit 77f779d into godotengine:master Sep 20, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@MewPurPur MewPurPur deleted the reveal-undoredo branch September 20, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants