Commit b0904169f1aa9ca10c9db10ef46d92eb66a08fc7
1 parent
216213cb
Exists in
master
and in
68 other branches
FIX: Multiple mask creation and interaction - had broken on last commit
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
invesalius/data/slice_.py
@@ -59,7 +59,7 @@ class Slice(object): | @@ -59,7 +59,7 @@ class Slice(object): | ||
59 | def __add_mask(self, pubsub_evt): | 59 | def __add_mask(self, pubsub_evt): |
60 | mask_name = pubsub_evt.data | 60 | mask_name = pubsub_evt.data |
61 | self.CreateMask(name=mask_name) | 61 | self.CreateMask(name=mask_name) |
62 | - self.ChangeCurrentMaskColour(self.current_mask.colour) | 62 | + self.SetMaskColour(self.current_mask.index, self.current_mask.colour) |
63 | 63 | ||
64 | def __select_current_mask(self, pubsub_evt): | 64 | def __select_current_mask(self, pubsub_evt): |
65 | mask_index = pubsub_evt.data | 65 | mask_index = pubsub_evt.data |
@@ -175,7 +175,7 @@ class Slice(object): | @@ -175,7 +175,7 @@ class Slice(object): | ||
175 | "Show a mask given its index and 'show' value (0: hide, other: show)" | 175 | "Show a mask given its index and 'show' value (0: hide, other: show)" |
176 | proj = Project() | 176 | proj = Project() |
177 | proj.mask_dict[index].is_shown = value | 177 | proj.mask_dict[index].is_shown = value |
178 | - if (mask_index == self.current_mask.index): | 178 | + if (index == self.current_mask.index): |
179 | if value: | 179 | if value: |
180 | self.blend_filter.SetOpacity(1, self.current_mask.opacity) | 180 | self.blend_filter.SetOpacity(1, self.current_mask.opacity) |
181 | else: | 181 | else: |
@@ -241,7 +241,7 @@ class Slice(object): | @@ -241,7 +241,7 @@ class Slice(object): | ||
241 | self.current_mask.threshold_range)) | 241 | self.current_mask.threshold_range)) |
242 | ps.Publisher().sendMessage('Set threshold values in gradient', | 242 | ps.Publisher().sendMessage('Set threshold values in gradient', |
243 | self.current_mask.threshold_range) | 243 | self.current_mask.threshold_range) |
244 | - ps.Publisher().sendMessage('Select mask name in combo', mask_index) | 244 | + ps.Publisher().sendMessage('Select mask name in combo', index) |
245 | ps.Publisher().sendMessage('Update slice viewer') | 245 | ps.Publisher().sendMessage('Update slice viewer') |
246 | #--------------------------------------------------------------------------- | 246 | #--------------------------------------------------------------------------- |
247 | 247 |