VTK viewer: restore Surface after a point cloud forces Points mode

Loading a point cloud correctly locks the shared actor to Points
representation, but the surface-mesh branch of the LOAD_MESH handler never
reset it -- so navigating from a point cloud back to a surface mesh (e.g.
scrolling a batch) left the mesh stuck rendering as points until you manually
picked Surface in settings.

Fix: in the non-point-cloud branch, restore property.setRepresentation to the
user's chosen mode (currentSettings.representation, default Surface). Point
clouds still switch to Points; switching back now returns to the chosen mode.
This commit is contained in:
PozzettiAndrea
2026-08-14 13:35:17 +02:00
parent 7f0c97cd89
commit a9e14f5dc2
+6
View File
@@ -384,6 +384,12 @@
const filteredPolyData = normalsFilter.getOutputData();
mapper.setInputData(filteredPolyData);
currentPolyData = filteredPolyData; // Update reference for field visualization
// Restore the user's chosen representation (default Surface).
// A point cloud forces Points mode on the shared actor property;
// without this, a surface mesh loaded right after a point cloud
// would stay stuck rendering as points.
property.setRepresentation(currentSettings.representation);
}
mapper.update();