mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2024-12-23 01:59:40 +08:00
Fix UEPanel save data issue
This commit is contained in:
parent
53c8dfcb6d
commit
c5e262d1c3
@ -75,13 +75,14 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
public void SaveInternalData()
|
||||
{
|
||||
if (UIManager.Initializing)
|
||||
if (UIManager.Initializing || ApplyingSaveData)
|
||||
return;
|
||||
|
||||
SetSaveDataToConfigValue();
|
||||
}
|
||||
|
||||
private void SetSaveDataToConfigValue() => ConfigManager.GetPanelSaveData(this.PanelType).Value = this.ToSaveData();
|
||||
private void SetSaveDataToConfigValue()
|
||||
=> ConfigManager.GetPanelSaveData(this.PanelType).Value = this.ToSaveData();
|
||||
|
||||
public virtual string ToSaveData()
|
||||
{
|
||||
@ -156,9 +157,10 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
protected override void LateConstructUI()
|
||||
{
|
||||
ApplyingSaveData = true;
|
||||
|
||||
base.LateConstructUI();
|
||||
|
||||
ApplyingSaveData = true;
|
||||
// apply panel save data or revert to default
|
||||
try
|
||||
{
|
||||
@ -177,6 +179,8 @@ namespace UnityExplorer.UI.Panels
|
||||
};
|
||||
|
||||
ApplyingSaveData = false;
|
||||
|
||||
Dragger.OnEndResize();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user