Merge pull request #92108 from KoBeWi/stash_focus_for_later
Disable follow focus while updating inspector
This commit is contained in:
commit
fc9a8d1e91
|
@ -28,7 +28,6 @@
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="follow_focus" type="bool" setter="set_follow_focus" getter="is_following_focus" overrides="ScrollContainer" default="true" />
|
|
||||||
<member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" />
|
<member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" />
|
||||||
</members>
|
</members>
|
||||||
<signals>
|
<signals>
|
||||||
|
|
|
@ -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.
|
// TODO: Can be useful to store more context for the focusable, such as the caret position in LineEdit.
|
||||||
StringName current_selected = property_selected;
|
StringName current_selected = property_selected;
|
||||||
int current_focusable = -1;
|
int current_focusable = -1;
|
||||||
|
// Temporarily disable focus following to avoid jumping while the inspector is updating.
|
||||||
|
set_follow_focus(false);
|
||||||
|
|
||||||
if (property_focusable != -1) {
|
if (property_focusable != -1) {
|
||||||
// Check that focusable is actually focusable.
|
// Check that focusable is actually focusable.
|
||||||
|
@ -3482,6 +3484,7 @@ void EditorInspector::update_tree() {
|
||||||
// Updating inspector might invalidate some editing owners.
|
// Updating inspector might invalidate some editing owners.
|
||||||
EditorNode::get_singleton()->hide_unused_editors();
|
EditorNode::get_singleton()->hide_unused_editors();
|
||||||
}
|
}
|
||||||
|
set_follow_focus(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorInspector::update_property(const String &p_prop) {
|
void EditorInspector::update_property(const String &p_prop) {
|
||||||
|
|
Loading…
Reference in New Issue