Added 'temp height cache' to ScrollPool for when filtering, fix some issues

This commit is contained in:
Sinai committed 2021-04-22 17:53:29 +10:00
1 parent fc26452f64
commit fdfadcefc1
10 files changed
+251 -125

No files matched your search

@@ -11,6 +11,8 @@ namespace UnityExplorer.UI.Widgets
{
public class TransformTree : IPoolDataSource
{
public int GetRealIndexOfTempIndex(int index) => throw new NotImplementedException("TODO");
public Func<IEnumerable<GameObject>> GetRootEntriesMethod;
public bool Filtering => !string.IsNullOrEmpty(currentFilter);
@@ -93,7 +95,7 @@ namespace UnityExplorer.UI.Widgets
: expandedInstanceIDs.Contains(instanceID);
}
public void RefreshData(bool andReload = false)
public void RefreshData(bool andReload = false, bool hardReload = false)
{
displayedObjects.Clear();
@@ -106,7 +108,12 @@ namespace UnityExplorer.UI.Widgets
}
if (andReload)
Scroller.RefreshCells(true);
{
if (!hardReload)
Scroller.RefreshCells(true);
else
Scroller.Rebuild();
}
}
private void Traverse(Transform transform, CachedTransform parent = null)