-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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 Delete All button to ItemList editor #44352
The head ref may contain hidden characters: "ItemList\u{1F525}\u{1F525}\u{1F525}\u{1F525}\u{1F525}"
Conversation
@@ -350,6 +357,11 @@ ItemListEditor::ItemListEditor() { | |||
|
|||
hbc->add_spacer(); | |||
|
|||
clear_button = memnew(Button); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the name in the code match the name given in the display? For consistency?
delete_all_button
, _delete_all_pressed()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. I thought it's easier to distinguish this way.
Maybe there should be a confirmation dialog mentioning how many entries will be removed? |
I could add the dialog, but IMO it would be better if we could just undo it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks good to me, but this shouldn't be merged until undo/redo support for the ItemList editor is merged (or a confirmation dialog is added).
Adding a confirmation dialog will also make this cherry-pickable to the 3.x
branch.
I think the plan is now to refactor the itemlist and other similar nodes to be edited directly on the inspector with the new upcoming PR from @groud. As such, I think it may make more sense to close this? What do you think? |
I think it doesn't hurt to merge this in the meantime, if this is refactored to be integrated in the Inspector, the whole file will be removed/redone anyway. |
Needs a rebase. |
Thanks! |
Closes godotengine/godot-proposals#1975
Loosely depends on #33300, which loosely depends on #43872