Cached sate of anchor drop down closed.

This commit is contained in:
Chandler Cox
2022-12-15 07:45:08 -06:00
parent 5a50656249
commit 86be1acd7a

View File

@@ -407,6 +407,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
public class UIControlControlEditor : GenericEditor
{
private Type _cachedType;
private bool _anchorDropDownClosed = true;
/// <inheritdoc />
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));
}