fix: use sha from bingrid if it exists

This commit is contained in:
2025-03-06 08:38:58 +01:00
parent 3086ef5ebf
commit abdb949113

View File

@@ -621,8 +621,10 @@ type ExtendedGrid(grid: IGrid) =
// this.initNodeTree ()
Util.tryFindElement grid elementTree.Value p
member this.getSha1() =
if gridSha1.Length = 0 then
member this.getSha1(?grid: BinGrid) =
if grid.IsSome && grid.Value.hash.Length > 0 then
gridSha1 <- grid.Value.hash
elif gridSha1.Length = 0 then
let bg : BinGrid = {
hash = [||]
vertices = (this :> IGrid).getVertices ()