1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Disable follow focus while updating inspector

This commit is contained in:
kobewi
2024-05-19 11:30:49 +02:00
parent daa81bbb7d
commit ba96affd6c
2 changed files with 3 additions and 1 deletions

View File

@@ -2727,6 +2727,8 @@ void EditorInspector::update_tree() {
// TODO: Can be useful to store more context for the focusable, such as the caret position in LineEdit.
StringName current_selected = property_selected;
int current_focusable = -1;
// Temporarily disable focus following to avoid jumping while the inspector is updating.
set_follow_focus(false);
if (property_focusable != -1) {
// Check that focusable is actually focusable.
@@ -3482,6 +3484,7 @@ void EditorInspector::update_tree() {
// Updating inspector might invalidate some editing owners.
EditorNode::get_singleton()->hide_unused_editors();
}
set_follow_focus(true);
}
void EditorInspector::update_property(const String &p_prop) {