Commit 2cd865491ff7bba76812f6cd455801c8c3cc9892
1 parent
74706f4e
Exists in
master
and in
68 other branches
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,6 +18,7 @@ class Slice(object): | ||
18 | def __init__(self): | 18 | def __init__(self): |
19 | self.imagedata = None | 19 | self.imagedata = None |
20 | self.current_mask = None | 20 | self.current_mask = None |
21 | + self.blend_filter = None | ||
21 | self.__bind_events() | 22 | self.__bind_events() |
22 | 23 | ||
23 | def __bind_events(self): | 24 | def __bind_events(self): |
@@ -216,7 +217,8 @@ class Slice(object): | @@ -216,7 +217,8 @@ class Slice(object): | ||
216 | 217 | ||
217 | # This condition is not necessary in Linux, only under mac and windows | 218 | # This condition is not necessary in Linux, only under mac and windows |
218 | # because combobox event is binded when the same item is selected again. | 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 | proj = Project() | 222 | proj = Project() |
221 | future_mask = proj.GetMask(index) | 223 | future_mask = proj.GetMask(index) |
222 | 224 | ||
@@ -398,6 +400,11 @@ class Slice(object): | @@ -398,6 +400,11 @@ class Slice(object): | ||
398 | future_mask.colour)) | 400 | future_mask.colour)) |
399 | 401 | ||
400 | self.current_mask = future_mask | 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 | def __create_mask(self, imagedata): | 410 | def __create_mask(self, imagedata): |