mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 14:17:51 +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()
|
public void SaveInternalData()
|
||||||
{
|
{
|
||||||
if (UIManager.Initializing)
|
if (UIManager.Initializing || ApplyingSaveData)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SetSaveDataToConfigValue();
|
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()
|
public virtual string ToSaveData()
|
||||||
{
|
{
|
||||||
@ -156,9 +157,10 @@ namespace UnityExplorer.UI.Panels
|
|||||||
|
|
||||||
protected override void LateConstructUI()
|
protected override void LateConstructUI()
|
||||||
{
|
{
|
||||||
|
ApplyingSaveData = true;
|
||||||
|
|
||||||
base.LateConstructUI();
|
base.LateConstructUI();
|
||||||
|
|
||||||
ApplyingSaveData = true;
|
|
||||||
// apply panel save data or revert to default
|
// apply panel save data or revert to default
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -177,6 +179,8 @@ namespace UnityExplorer.UI.Panels
|
|||||||
};
|
};
|
||||||
|
|
||||||
ApplyingSaveData = false;
|
ApplyingSaveData = false;
|
||||||
|
|
||||||
|
Dragger.OnEndResize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user