From a2e45b2ae5707eeb24d81ff8b94d59bfd5afd819 Mon Sep 17 00:00:00 2001 From: tatiana Date: Fri, 22 Jan 2010 18:15:40 +0000 Subject: [PATCH] FIX: Remove old actors from render when proejct is closed --- invesalius/data/surface.py | 2 ++ invesalius/data/viewer_volume.py | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/invesalius/data/surface.py b/invesalius/data/surface.py index 9383f7e..caccefa 100644 --- a/invesalius/data/surface.py +++ b/invesalius/data/surface.py @@ -120,6 +120,8 @@ class SurfaceManager(): self.CloseProject() def CloseProject(self): + for index in self.actors_dict: + ps.Publisher().sendMessage('Remove surface actor from viewer', self.actors_dict[index]) del self.actors_dict self.actors_dict = {} diff --git a/invesalius/data/viewer_volume.py b/invesalius/data/viewer_volume.py index d1dd2f9..be84fa3 100755 --- a/invesalius/data/viewer_volume.py +++ b/invesalius/data/viewer_volume.py @@ -124,6 +124,7 @@ class Viewer(wx.Panel): ps.Publisher().subscribe(self.OnShowText, 'Show text actors on viewers') + def OnHideText(self, pubsub_evt): self.text.Hide() self.interactor.Render() -- libgit2 0.21.2