diff --git a/libsrc/visualization/vssolution.cpp b/libsrc/visualization/vssolution.cpp index eb0bb8a1..2a61662b 100644 --- a/libsrc/visualization/vssolution.cpp +++ b/libsrc/visualization/vssolution.cpp @@ -29,6 +29,11 @@ namespace netgen // vssolution.AddUserVisualizationObject (vis); GetVSSolution().AddUserVisualizationObject (vis); } + void DeleteUserVisualizationObject (UserVisualizationObject * vis) + { + // vssolution.AddUserVisualizationObject (vis); + GetVSSolution().DeleteUserVisualizationObject (vis); + } VisualSceneSolution :: SolData :: SolData () diff --git a/libsrc/visualization/vssolution.hpp b/libsrc/visualization/vssolution.hpp index 1fa815f8..e10c8762 100644 --- a/libsrc/visualization/vssolution.hpp +++ b/libsrc/visualization/vssolution.hpp @@ -233,7 +233,12 @@ public: { user_vis.Append (vis); } - + void DeleteUserVisualizationObject (UserVisualizationObject * vis) + { + int pos = user_vis.Pos(vis); + if (pos >= 0) + user_vis.Delete(pos); + } private: void GetClippingPlaneTrigs (NgArray & trigs, NgArray & pts);