Commit 2cd865491ff7bba76812f6cd455801c8c3cc9892

Authored by tatiana
1 parent 74706f4e

FIX: Edit recently created mask is working.

Showing 1 changed file with 8 additions and 1 deletions   Show diff stats
invesalius/data/slice_.py
... ... @@ -18,6 +18,7 @@ class Slice(object):
18 18 def __init__(self):
19 19 self.imagedata = None
20 20 self.current_mask = None
  21 + self.blend_filter = None
21 22 self.__bind_events()
22 23  
23 24 def __bind_events(self):
... ... @@ -216,7 +217,8 @@ class Slice(object):
216 217  
217 218 # This condition is not necessary in Linux, only under mac and windows
218 219 # because combobox event is binded when the same item is selected again.
219   - if index != self.current_mask.index:
  220 + #if index != self.current_mask.index:
  221 + if self.current_mask and self.blend_filter:
220 222 proj = Project()
221 223 future_mask = proj.GetMask(index)
222 224  
... ... @@ -398,6 +400,11 @@ class Slice(object):
398 400 future_mask.colour))
399 401  
400 402 self.current_mask = future_mask
  403 +
  404 + ps.Publisher().sendMessage('Change mask selected', future_mask.index)
  405 + #ps.Publisher().sendMessage('Show mask', (future_mask.index, 1))
  406 + ps.Publisher().sendMessage('Update slice viewer')
  407 +
401 408  
402 409  
403 410 def __create_mask(self, imagedata):
... ...