In OrderFeature, corretto ordinamento quando ci sono dipendenze

This commit is contained in:
andrea.villa
2026-09-08 10:01:49 +02:00
parent ca2176af8a
commit 14644a7c8b
3 changed files with 8 additions and 3 deletions
+4 -2
View File
@@ -913,7 +913,8 @@ local function ReorderFeatureWithDependency( vProc)
-- se il processo deve stare prima, ma ora è dopo
if nRefIndex and nRefIndex < i then
table.insert( vProc, nRefIndex, table.remove( vProc, i))
i = max( nRefIndex - 1, 1)
-- se ci sono stati scambi, si ricomincia da capo
i = 0
end
elseif Drill.Identify( vProc[i]) and vProc[i].Dependency and vProc[i].Dependency.ExecAfter and vProc[i].Dependency.ExecAfter.Id then
local nRefId = vProc[i].Dependency.ExecAfter.Id
@@ -929,7 +930,8 @@ local function ReorderFeatureWithDependency( vProc)
-- se il processo deve stare dopo, ma ora è prima
if nRefIndex and nRefIndex > i then
table.insert( vProc, nRefIndex, table.remove( vProc, i))
i = max( nRefIndex - 1, 1)
-- se ci sono stati scambi, si ricomincia da capo
i = 0
end
end
i = i + 1