Commit 4511a871f2b7e8c449bef9a781c16c5170419196
1 parent
f49cc291
Exists in
master
and in
1 other branch
Restarting surface counting when closing project
Showing
2 changed files
with
4 additions
and
0 deletions
Show diff stats
invesalius/data/surface.py
@@ -361,6 +361,9 @@ class SurfaceManager(): | @@ -361,6 +361,9 @@ class SurfaceManager(): | ||
361 | del self.actors_dict | 361 | del self.actors_dict |
362 | self.actors_dict = {} | 362 | self.actors_dict = {} |
363 | 363 | ||
364 | + # restarting the surface index | ||
365 | + Surface.general_index = -1 | ||
366 | + | ||
364 | def OnSelectSurface(self, pubsub_evt): | 367 | def OnSelectSurface(self, pubsub_evt): |
365 | index = pubsub_evt.data | 368 | index = pubsub_evt.data |
366 | #self.last_surface_index = index | 369 | #self.last_surface_index = index |
invesalius/gui/task_surface.py
@@ -501,6 +501,7 @@ class SurfaceProperties(wx.Panel): | @@ -501,6 +501,7 @@ class SurfaceProperties(wx.Panel): | ||
501 | n = self.combo_surface_name.GetCount() | 501 | n = self.combo_surface_name.GetCount() |
502 | for i in xrange(n-1, -1, -1): | 502 | for i in xrange(n-1, -1, -1): |
503 | self.combo_surface_name.Delete(i) | 503 | self.combo_surface_name.Delete(i) |
504 | + self.surface_list = [] | ||
504 | 505 | ||
505 | def ChangeSurfaceName(self, pubsub_evt): | 506 | def ChangeSurfaceName(self, pubsub_evt): |
506 | index, name = pubsub_evt.data | 507 | index, name = pubsub_evt.data |