From 86be1acd7a0e36dd6b52b3e7604388643a1b1d6b Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Thu, 15 Dec 2022 07:45:08 -0600 Subject: [PATCH] Cached sate of anchor drop down closed. --- Source/Editor/CustomEditors/Dedicated/UIControlEditor.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Editor/CustomEditors/Dedicated/UIControlEditor.cs b/Source/Editor/CustomEditors/Dedicated/UIControlEditor.cs index 602c6d0ee..1050139be 100644 --- a/Source/Editor/CustomEditors/Dedicated/UIControlEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/UIControlEditor.cs @@ -407,6 +407,7 @@ namespace FlaxEditor.CustomEditors.Dedicated public class UIControlControlEditor : GenericEditor { private Type _cachedType; + private bool _anchorDropDownClosed = true; /// public override void Initialize(LayoutElementsContainer layout) @@ -498,7 +499,8 @@ namespace FlaxEditor.CustomEditors.Dedicated ItemInfo maxItem = new ItemInfo(maxInfo); GroupElement ng = main.Group("Anchors", true); - ng.Panel.Close(false); + ng.Panel.IsClosed = _anchorDropDownClosed; + ng.Panel.IsClosedChanged += panel => _anchorDropDownClosed = panel.IsClosed; ng.Property("Min", minItem.GetValues(Values)); ng.Property("Max", maxItem.GetValues(Values)); }