From 7838ec056c4d68acd86b2b3a7d2501a3a962c47e Mon Sep 17 00:00:00 2001 From: tfmoraes Date: Fri, 5 Mar 2010 17:57:53 +0000 Subject: [PATCH] ENH: Remove measure in viewer_volume is working --- invesalius/data/viewer_volume.py | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) diff --git a/invesalius/data/viewer_volume.py b/invesalius/data/viewer_volume.py index 5d02b7b..fb8ae70 100755 --- a/invesalius/data/viewer_volume.py +++ b/invesalius/data/viewer_volume.py @@ -143,6 +143,8 @@ class Viewer(wx.Panel): 'Hide text actors on viewers') ps.Publisher().subscribe(self.AddActors, ('Add actors', const.SURFACE)) + ps.Publisher().subscribe(self.RemoveActors, ('Remove actors', + const.SURFACE)) ps.Publisher().subscribe(self.OnShowText, 'Show text actors on viewers') @@ -233,6 +235,12 @@ class Viewer(wx.Panel): for actor in actors: self.ren.AddActor(actor) + def RemoveActors(self, pubsub_evt): + "Remove a list of actors" + actors = pubsub_evt.data + for actor in actors: + self.ren.RemoveActor(actor) + def AddPointReference(self, position, radius=1, colour=(1, 0, 0)): """ Add a point representation in the given x,y,z position with a optional -- libgit2 0.21.2