Commit f532e8459bfa6591c5d0b0f46702712884be83d5
1 parent
89b570f5
Exists in
master
and in
6 other branches
FIX: Close project and open other project the raycast cut plane not removed #126
Showing
2 changed files
with
9 additions
and
10 deletions
Show diff stats
invesalius/data/viewer_volume.py
@@ -180,15 +180,21 @@ class Viewer(wx.Panel): | @@ -180,15 +180,21 @@ class Viewer(wx.Panel): | ||
180 | def OnCloseProject(self, pubsub_evt): | 180 | def OnCloseProject(self, pubsub_evt): |
181 | if self.raycasting_volume: | 181 | if self.raycasting_volume: |
182 | self.raycasting_volume = False | 182 | self.raycasting_volume = False |
183 | + | ||
183 | if self.slice_plane: | 184 | if self.slice_plane: |
184 | self.slice_plane.Disable() | 185 | self.slice_plane.Disable() |
185 | self.slice_plane.DeletePlanes() | 186 | self.slice_plane.DeletePlanes() |
186 | del self.slice_plane | 187 | del self.slice_plane |
187 | ps.Publisher().sendMessage('Uncheck image plane menu') | 188 | ps.Publisher().sendMessage('Uncheck image plane menu') |
189 | + self.mouse_pressed = 0 | ||
190 | + self.on_wl = False | ||
191 | + self.slice_plane = 0 | ||
192 | + | ||
193 | + #if self.text: | ||
194 | + # del self.text | ||
195 | + # self.text = 0 | ||
188 | 196 | ||
189 | - self.mouse_pressed = 0 | ||
190 | - self.on_wl = False | ||
191 | - self.slice_plane = 0 | 197 | + |
192 | 198 | ||
193 | 199 | ||
194 | def OnHideText(self, pubsub_evt): | 200 | def OnHideText(self, pubsub_evt): |
invesalius/data/volume.py
@@ -111,14 +111,9 @@ class Volume(): | @@ -111,14 +111,9 @@ class Volume(): | ||
111 | # self.plane = None | 111 | # self.plane = None |
112 | # ps.Publisher().sendMessage('Remove surface actor from viewer', self.plane_actor) | 112 | # ps.Publisher().sendMessage('Remove surface actor from viewer', self.plane_actor) |
113 | if self.plane: | 113 | if self.plane: |
114 | - print "======================================================================================================" | ||
115 | - #ps.Publisher().sendMessage('Remove surface actor from viewer', self.plane.plane_actor) | ||
116 | - #self.plane.Disable() | ||
117 | self.plane.DestroyObjs() | 114 | self.plane.DestroyObjs() |
118 | del self.plane | 115 | del self.plane |
119 | - #del self.final_imagedata | ||
120 | self.plane = 0 | 116 | self.plane = 0 |
121 | - | ||
122 | 117 | ||
123 | if self.exist: | 118 | if self.exist: |
124 | self.exist = None | 119 | self.exist = None |
@@ -695,5 +690,3 @@ class CutPlane: | @@ -695,5 +690,3 @@ class CutPlane: | ||
695 | del self.plane_actor | 690 | del self.plane_actor |
696 | del self.normal | 691 | del self.normal |
697 | del self.plane | 692 | del self.plane |
698 | - ps.Publisher().sendMessage('Remove all volume actors') | ||
699 | - |