Commit a2e45b2ae5707eeb24d81ff8b94d59bfd5afd819

Authored by tatiana
1 parent fea0946c

FIX: Remove old actors from render when proejct is closed

invesalius/data/surface.py
... ... @@ -120,6 +120,8 @@ class SurfaceManager():
120 120 self.CloseProject()
121 121  
122 122 def CloseProject(self):
  123 + for index in self.actors_dict:
  124 + ps.Publisher().sendMessage('Remove surface actor from viewer', self.actors_dict[index])
123 125 del self.actors_dict
124 126 self.actors_dict = {}
125 127  
... ...
invesalius/data/viewer_volume.py
... ... @@ -124,6 +124,7 @@ class Viewer(wx.Panel):
124 124 ps.Publisher().subscribe(self.OnShowText,
125 125 'Show text actors on viewers')
126 126  
  127 +
127 128 def OnHideText(self, pubsub_evt):
128 129 self.text.Hide()
129 130 self.interactor.Render()
... ...