mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-07 18:13:35 +08:00
Update DataHeightManager.cs
This commit is contained in:
parent
1a8c2499fa
commit
837d5792be
@ -161,11 +161,10 @@ namespace UnityExplorer.UI.Widgets
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we guessed wrong. if diff is > 1 than add it and try again.
|
// our index is further down. add the min difference and try again.
|
||||||
// the new min start index will be at least the diff from our index.
|
// the iterator will add 1 on the next loop so account for that.
|
||||||
int jmp = Math.Max(0, dataIndex - rangeToDataIndexCache[i]);
|
int jmp = dataIndex - rangeToDataIndexCache[i] - 1;
|
||||||
if (jmp > 1)
|
i += jmp < 1 ? 0 : jmp;
|
||||||
i += jmp - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rangeStart == -1)
|
if (rangeStart == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user