diff --git a/packages/lb-components/src/components/pointCloudView/PointCloud3DView.tsx b/packages/lb-components/src/components/pointCloudView/PointCloud3DView.tsx index 9c72f7fe..67851bd6 100644 --- a/packages/lb-components/src/components/pointCloudView/PointCloud3DView.tsx +++ b/packages/lb-components/src/components/pointCloudView/PointCloud3DView.tsx @@ -231,7 +231,9 @@ const PointCloud3D: React.FC = ({ // Because updatePolygonList will reset the selected state, it is necessary to reset the current rectangle selection ptCtx.setSelectedIDs(currentSelectInfo.id); } - ptCtx.setPointCloudValid(jsonParser(currentData.result)?.valid); + const resultObj = jsonParser(currentData.result); + const preResultObj = jsonParser(currentData.preResult); + ptCtx.setPointCloudValid(resultObj?.valid ?? preResultObj?.valid); ptCtx.setPointCloudResult(boxParamsList); ptCtx.setRectList(rectParamsList); // Update the box of 3D view diff --git a/packages/lb-components/src/components/pointCloudView/hooks/usePointCloudViews.ts b/packages/lb-components/src/components/pointCloudView/hooks/usePointCloudViews.ts index fa932a1e..803e9b16 100644 --- a/packages/lb-components/src/components/pointCloudView/hooks/usePointCloudViews.ts +++ b/packages/lb-components/src/components/pointCloudView/hooks/usePointCloudViews.ts @@ -1353,7 +1353,9 @@ export const usePointCloudViews = (params?: IUsePointCloudViewsParams) => { mainViewInstance.updateTopCamera(); - const valid = jsonParser(newData.result)?.valid ?? true; + const resultObj = jsonParser(newData.result); + const preResultObj = jsonParser(newData.preResult); + const valid = resultObj?.valid ?? preResultObj?.valid ?? true; ptCtx.setPointCloudValid(valid); // Clear other view data during initialization