Commit f6d61f6d39c36c2a4881d5cbe47bd1359cdf592b

Authored by tfmoraes
1 parent a4e1733a

FIX: A surface was turning visible when the user selected it in the data_noteboo…

…k when it only need to be visible when the user click in the icon make it visible
invesalius/data/surface.py
@@ -315,12 +315,13 @@ class SurfaceManager(): @@ -315,12 +315,13 @@ class SurfaceManager():
315 # self.actors_dict. 315 # self.actors_dict.
316 proj = prj.Project() 316 proj = prj.Project()
317 surface = proj.surface_dict[index] 317 surface = proj.surface_dict[index]
318 - Publisher.sendMessage('Update surface info in GUI',  
319 - (index, surface.name,  
320 - surface.colour, surface.volume,  
321 - surface.transparency)) 318 + if surface.is_shown:
  319 + Publisher.sendMessage('Update surface info in GUI',
  320 + (index, surface.name,
  321 + surface.colour, surface.volume,
  322 + surface.transparency))
322 self.last_surface_index = index 323 self.last_surface_index = index
323 - self.ShowActor(index, True) 324 + #self.ShowActor(index, True)
324 325
325 326
326 def OnLoadSurfaceDict(self, pubsub_evt): 327 def OnLoadSurfaceDict(self, pubsub_evt):
invesalius/gui/task_surface.py
@@ -486,6 +486,7 @@ class SurfaceProperties(wx.Panel): @@ -486,6 +486,7 @@ class SurfaceProperties(wx.Panel):
486 self.combo_surface_name.Refresh() 486 self.combo_surface_name.Refresh()
487 487
488 def InsertNewSurface(self, pubsub_evt): 488 def InsertNewSurface(self, pubsub_evt):
  489 + print "HERE"
489 #not_update = len(pubsub_evt.data) == 5 490 #not_update = len(pubsub_evt.data) == 5
490 index = pubsub_evt.data[0] 491 index = pubsub_evt.data[0]
491 name = pubsub_evt.data[1] 492 name = pubsub_evt.data[1]