mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 14:17:51 +08:00
Update DataHeightCache.cs
This commit is contained in:
parent
b0d54b1d80
commit
99e11b41a3
@ -124,10 +124,9 @@ namespace UnityExplorer.UI.Widgets
|
|||||||
return 0;
|
return 0;
|
||||||
if (rangeIndex >= rangeCache.Count)
|
if (rangeIndex >= rangeCache.Count)
|
||||||
{
|
{
|
||||||
ExplorerCore.Log("desiredHeight is " + desiredHeight + ", but our total height is " + totalHeight + ", clamping to data count");
|
int idx = ScrollPool.DataSource.ItemCount - 1;
|
||||||
ExplorerCore.Log("highest data index: " + (ScrollPool.DataSource.ItemCount - 1) + ", rangeIndex was " + rangeIndex + ", actual range limit is " + (rangeCache.Count - 1));
|
cache = heightCache[idx];
|
||||||
cache = heightCache[heightCache.Count - 1];
|
return idx;
|
||||||
return ScrollPool.DataSource.ItemCount - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int dataIndex = rangeCache[rangeIndex];
|
int dataIndex = rangeCache[rangeIndex];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user