-
-
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
Fix editor inspector refresh not working #41697
Fix editor inspector refresh not working #41697
Conversation
1daa2e9
to
5612770
Compare
Thanks! |
This needs to be reverted, as it misunderstood what refresh is for. Its causing the editor to redraw all the time and this is extremely inefficient. |
The correct solution is a smart refresh, checking if properties changed and only then update them, but this is a much bigger undertaking |
I think you need different logic here. There is a refresh() call which sets the refresh countdown. As you will be refreshing all the time, you can change that to a bool force_update_property_editors; to true instead of setting the refresh countdown. Then in the refresh logic, you want something like this:
For the has_changed() method, I think EditorProperty need to be able to figure out when the value inside the object differs from what was edited. One way could be caching the value in EditorProperty::emit_changed, another is doing this manually in every editor which may be too much. |
Removing cherry-pick label as this was reverted. |
Closes #41675
Inspector will cache refresh interval value so it does not need to
EDITOR_GET
after every interval.