Fix create dialog recents#115314
Conversation
|
Returning script path is deliberate. It's needed for If it's a problem for history, add a new method that returns the actual type name. |
8658aae to
36adac7
Compare
That's correct. I made a change. Could you please verify if it's correct now? Thank you for your attention! |
36adac7 to
e8cad1c
Compare
|
Could you squash your commits? See our pull request guidelines for more information |
e8cad1c to
4a2d146
Compare
This branch contains a single commit on top of master. The PR can be squashed on merge. |
4a2d146 to
eb43b38
Compare
|
Your commit seems to not be linked to your GitHub account. See this article for more information |
eb43b38 to
35a9ec1
Compare
Thanks for the heads up! I’ve rewritten the commits so they’re now authored with the same GitHub account that opened the PR. |
|
Thanks! Congratulations on your first merged contribution! 🎉 |
|
Cherry-picked for 4.6.1. |
…dialog-recents Fix create dialog recents


The
CreateDialog::get_selected_type()method can return an empty string for custom types.When
EditorNode::get_editor_data().get_custom_type_by_name()returnsnullptr, it relies on_script_path, which is only defined for global script classes. As a result,_confirmed()terminates prematurely (selected_item.is_empty()), therefore the recent history is never shown for custom types.Returning the visible name of the selected item (
selected->get_text(0)) corrects the problem and matches how Recent/Favorite items are already handled (based on name, not path).See the before and after photos below: