Commit 0f686335debdc11c081063fc94139411a66f06a3
Committed by
GitHub
Exists in
master
Merge branch 'master' into robot-status-UI
Showing
3 changed files
with
5 additions
and
4 deletions
Show diff stats
invesalius/control.py
... | ... | @@ -965,7 +965,7 @@ class Controller(): |
965 | 965 | re_dialog = dialog.ResizeImageDialog() |
966 | 966 | re_dialog.SetValue(int(resolution_percentage*100)) |
967 | 967 | re_dialog_value = re_dialog.ShowModal() |
968 | - re_dialog.Close() | |
968 | + re_dialog.Close() | |
969 | 969 | |
970 | 970 | if re_dialog_value == wx.ID_OK: |
971 | 971 | percentage = re_dialog.GetValue() |
... | ... | @@ -1143,7 +1143,7 @@ class Controller(): |
1143 | 1143 | def show_mask_preview(self, index, flag=True): |
1144 | 1144 | proj = prj.Project() |
1145 | 1145 | mask = proj.mask_dict[index] |
1146 | - slc = self.Slice.do_threshold_to_all_slices(mask) | |
1146 | + self.Slice.do_threshold_to_all_slices(mask) | |
1147 | 1147 | mask.create_3d_preview() |
1148 | 1148 | Publisher.sendMessage("Load mask preview", mask_3d_actor=mask.volume._actor, flag=flag) |
1149 | 1149 | Publisher.sendMessage("Reload actual slice") | ... | ... |
invesalius/data/slice_.py
... | ... | @@ -264,8 +264,6 @@ class Slice(metaclass=utils.Singleton): |
264 | 264 | def OnRemoveMasks(self, mask_indexes): |
265 | 265 | proj = Project() |
266 | 266 | for item in mask_indexes: |
267 | - proj.RemoveMask(item) | |
268 | - | |
269 | 267 | # if the deleted mask is the current mask, cleans the current mask |
270 | 268 | # and discard from buffer all datas related to mask. |
271 | 269 | if self.current_mask is not None and item == self.current_mask.index: |
... | ... | @@ -277,6 +275,7 @@ class Slice(metaclass=utils.Singleton): |
277 | 275 | |
278 | 276 | Publisher.sendMessage("Show mask", index=item, value=False) |
279 | 277 | Publisher.sendMessage("Reload actual slice") |
278 | + proj.RemoveMask(item) | |
280 | 279 | |
281 | 280 | def OnDuplicateMasks(self, mask_indexes): |
282 | 281 | proj = Project() |
... | ... | @@ -1185,6 +1184,7 @@ class Slice(metaclass=utils.Singleton): |
1185 | 1184 | future_mask = proj.GetMask(index) |
1186 | 1185 | future_mask.is_shown = True |
1187 | 1186 | self.current_mask = future_mask |
1187 | + self.current_mask.on_show() | |
1188 | 1188 | |
1189 | 1189 | colour = future_mask.colour |
1190 | 1190 | self.SetMaskColour(index, colour, update=False) | ... | ... |
optional-requirements.txt