Commit 7838ec056c4d68acd86b2b3a7d2501a3a962c47e
1 parent
63597fef
Exists in
master
and in
6 other branches
ENH: Remove measure in viewer_volume is working
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
invesalius/data/viewer_volume.py
... | ... | @@ -143,6 +143,8 @@ class Viewer(wx.Panel): |
143 | 143 | 'Hide text actors on viewers') |
144 | 144 | |
145 | 145 | ps.Publisher().subscribe(self.AddActors, ('Add actors', const.SURFACE)) |
146 | + ps.Publisher().subscribe(self.RemoveActors, ('Remove actors', | |
147 | + const.SURFACE)) | |
146 | 148 | |
147 | 149 | ps.Publisher().subscribe(self.OnShowText, |
148 | 150 | 'Show text actors on viewers') |
... | ... | @@ -233,6 +235,12 @@ class Viewer(wx.Panel): |
233 | 235 | for actor in actors: |
234 | 236 | self.ren.AddActor(actor) |
235 | 237 | |
238 | + def RemoveActors(self, pubsub_evt): | |
239 | + "Remove a list of actors" | |
240 | + actors = pubsub_evt.data | |
241 | + for actor in actors: | |
242 | + self.ren.RemoveActor(actor) | |
243 | + | |
236 | 244 | def AddPointReference(self, position, radius=1, colour=(1, 0, 0)): |
237 | 245 | """ |
238 | 246 | Add a point representation in the given x,y,z position with a optional | ... | ... |