Defer loading XML documentation during while loading the editor

This commit is contained in:
Ari Vuollet
2025-05-02 14:03:14 +03:00
parent c916fb1844
commit c2e8e492d7
@@ -325,6 +325,7 @@ namespace FlaxEditor.CustomEditors
}
private bool _buildOnUpdate;
private bool _initialized;
private bool _readOnly;
/// <summary>
@@ -412,6 +413,7 @@ namespace FlaxEditor.CustomEditors
ClearLayout();
_buildOnUpdate = false;
_initialized = true;
Editor.Setup(this);
Panel.IsLayoutLocked = false;
@@ -488,6 +490,10 @@ namespace FlaxEditor.CustomEditors
/// </summary>
protected virtual void OnSelectionChanged()
{
// Defer building the layout after we have initialized to improve initial loading times
if (!_initialized)
_buildOnUpdate = true;
else
BuildLayout();
SelectionChanged?.Invoke();
}