Commit 0879edaa8ed0b2ae7d60a17dce8ca1d4d007df83

Authored by Paulo Henrique Junqueira Amorim
1 parent 61827842

ENH: Improvements selection of surface

Showing 1 changed file with 9 additions and 9 deletions   Show diff stats
invesalius/gui/task_surface.py
... ... @@ -486,20 +486,20 @@ class SurfaceProperties(wx.Panel):
486 486 self.combo_surface_name.Refresh()
487 487  
488 488 def InsertNewSurface(self, pubsub_evt):
489   - print "HERE"
490 489 #not_update = len(pubsub_evt.data) == 5
491 490 index = pubsub_evt.data[0]
492 491 name = pubsub_evt.data[1]
493 492 colour = [value*255 for value in pubsub_evt.data[2]]
494 493 overwrite = name in self.surface_dict.keys()
495   - if index not in self.surface_dict.values():
496   - if not overwrite or not self.surface_dict:
497   - self.surface_dict[name] = index
498   - index = self.combo_surface_name.Append(name)
499   - transparency = 100*pubsub_evt.data[4]
500   - self.button_colour.SetColour(colour)
501   - self.slider_transparency.SetValue(transparency)
502   - self.combo_surface_name.SetSelection(index)
  494 + #if index not in self.surface_dict.values():
  495 + if not overwrite or not self.surface_dict:
  496 + self.surface_dict[name] = index
  497 + index = self.combo_surface_name.Append(name)
  498 + transparency = 100*pubsub_evt.data[4]
  499 + self.button_colour.SetColour(colour)
  500 + self.slider_transparency.SetValue(transparency)
  501 + self.combo_surface_name.SetSelection(index)
  502 +
503 503  
504 504 def OnComboName(self, evt):
505 505 surface_name = evt.GetString()
... ...