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

Remove UndoRedo calls trying to call removed EditorInspector::refresh() #61288

Merged

Conversation

kleonc
Copy link
Member

@kleonc kleonc commented May 22, 2022

Fixes #61267.

EditorInspector::refresh() was removed in #45879. I think the removed code doesn't need to be replaced by anything as now inspector is meant to auto detect the changes and refresh itself automatically.
I've searched for "refresh", haven't found any more leftovers.

@kleonc kleonc added this to the 4.0 milestone May 22, 2022
@akien-mga akien-mga merged commit 01d383a into godotengine:master May 22, 2022
@akien-mga
Copy link
Member

Thanks!

@kleonc kleonc deleted the inspector_is_no_longer_refreshable branch May 22, 2022 18:20
@Rindbee
Copy link
Contributor

Rindbee commented May 23, 2022

Regarding undo/redo in Inspector, if you want to refresh immediately, you still need to record Inspector::_edit_request_change. Otherwise, the refresh interval will depend on docks/property_editor/auto_refresh_interval (if you set it to 10s, the association will be easily discovered).

I had tried to fix this issue before. In #60792.

@kleonc
Copy link
Member Author

kleonc commented May 23, 2022

Regarding undo/redo in Inspector, if you want to refresh immediately, you still need to record Inspector::_edit_request_change. Otherwise, the refresh interval will depend on docks/property_editor/auto_refresh_interval (if you set it to 10s, the association will be easily discovered).

Isn't it like that for any undoed/redoed property visible in the inspector though? I haven't checked the relevant code deeply so I'm not sure. But if that's the case then it would be strange to refresh immediately just in case of MultiNodeEdit (instead of for any edited Object).

Also Inspector::_edit_request_change is a private method and currently it's being used only within the EditorInspector. So calling it externally seems wrong. And doing so is possible because it's binded to ClassDB just so the EditorInspector itself could add such calls to its own UndoRedo actions (so this usage is kinda internal).

@Rindbee
Copy link
Contributor

Rindbee commented May 23, 2022

Just thought the intent of the previous code was to refresh immediately.

Here, wherever the refresh code is placed, it feels a little awkward. It feels like MultiNodeEdit is the part that separated from EditorInspector::_edit_set, but there's a strong connection.

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.

Error while setting Expand Icon using Multi-Select
3 participants