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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user