fix: prevent duplicate database save during XML import deserialization
- ParseRouteElement used route.AddPoint() which called RecalculateAndSaveRoute - This saved the path to DB with original name before ImportPathCommand could rename it - Changed to route.Points.Add() + route.RecalculateRoute() to skip DB save - Only ImportPathCommand → AddRoute → SavePathToDatabase now persists renamed path
This commit is contained in:
parent
c2a37fe007
commit
0cff495331
@ -1594,10 +1594,12 @@ namespace NavisworksTransport
|
||||
var point = ParsePointElement(pointNode);
|
||||
if (point != null)
|
||||
{
|
||||
route.AddPoint(point);
|
||||
route.Points.Add(point);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 仅在内存中重建几何/索引,不触发数据库保存
|
||||
route.RecalculateRoute("XML导入");
|
||||
}
|
||||
|
||||
return route;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user