Commit 8c0472fa4d5a7dadfdb0d1e37eb7f8f80cd2073e
1 parent
36a1d770
Exists in
master
and in
68 other branches
FIX: Select overwrite and generate first surface problem #117
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
invesalius/data/surface.py
... | ... | @@ -297,6 +297,7 @@ class SurfaceManager(): |
297 | 297 | else: |
298 | 298 | index = proj.AddSurface(surface) |
299 | 299 | surface.index = index |
300 | + self.last_surface_index = index | |
300 | 301 | |
301 | 302 | |
302 | 303 | session = ses.Session() |
... | ... | @@ -313,7 +314,7 @@ class SurfaceManager(): |
313 | 314 | ps.Publisher().sendMessage('Load surface actor into viewer', actor) |
314 | 315 | |
315 | 316 | # Send actor by pubsub to viewer's render |
316 | - if overwrite: | |
317 | + if overwrite and self.actors_dict.keys(): | |
317 | 318 | old_actor = self.actors_dict[self.last_surface_index] |
318 | 319 | ps.Publisher().sendMessage('Remove surface actor from viewer', old_actor) |
319 | 320 | ... | ... |