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 | 180 | def OnCloseProject(self, pubsub_evt): |
181 | 181 | if self.raycasting_volume: |
182 | 182 | self.raycasting_volume = False |
183 | + | |
183 | 184 | if self.slice_plane: |
184 | 185 | self.slice_plane.Disable() |
185 | 186 | self.slice_plane.DeletePlanes() |
186 | 187 | del self.slice_plane |
187 | 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 | 200 | def OnHideText(self, pubsub_evt): | ... | ... |
invesalius/data/volume.py
... | ... | @@ -111,14 +111,9 @@ class Volume(): |
111 | 111 | # self.plane = None |
112 | 112 | # ps.Publisher().sendMessage('Remove surface actor from viewer', self.plane_actor) |
113 | 113 | if self.plane: |
114 | - print "======================================================================================================" | |
115 | - #ps.Publisher().sendMessage('Remove surface actor from viewer', self.plane.plane_actor) | |
116 | - #self.plane.Disable() | |
117 | 114 | self.plane.DestroyObjs() |
118 | 115 | del self.plane |
119 | - #del self.final_imagedata | |
120 | 116 | self.plane = 0 |
121 | - | |
122 | 117 | |
123 | 118 | if self.exist: |
124 | 119 | self.exist = None |
... | ... | @@ -695,5 +690,3 @@ class CutPlane: |
695 | 690 | del self.plane_actor |
696 | 691 | del self.normal |
697 | 692 | del self.plane |
698 | - ps.Publisher().sendMessage('Remove all volume actors') | |
699 | - | ... | ... |