From 2bd9acdd9ece0404470f40d0135e7812412edc5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Fri, 11 Oct 2019 22:23:14 +0200 Subject: [PATCH] delete user-vis --- libsrc/visualization/vssolution.cpp | 5 +++++ libsrc/visualization/vssolution.hpp | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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);