Commit 10739323bf5e0300d51bd363507476f50fe6a076
1 parent
aff7c8ad
Exists in
select_part
Option to deselect part
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
invesalius/data/styles.py
... | ... | @@ -1957,6 +1957,7 @@ class SelectMaskPartsInteractorStyle(DefaultInteractorStyle): |
1957 | 1957 | |
1958 | 1958 | def CleanUp(self): |
1959 | 1959 | if self.config.mask: |
1960 | + self.viewer.slice_.SelectCurrentMask(self.config.mask.index) | |
1960 | 1961 | self.config.mask = None |
1961 | 1962 | del self.viewer.slice_.aux_matrices['SELECT'] |
1962 | 1963 | self.viewer.slice_.to_show_aux = '' |
... | ... | @@ -1978,7 +1979,11 @@ class SelectMaskPartsInteractorStyle(DefaultInteractorStyle): |
1978 | 1979 | if self.config.mask is None: |
1979 | 1980 | self._create_new_mask() |
1980 | 1981 | |
1981 | - floodfill.floodfill_threshold(mask, [[x, y, z]], self.t0, self.t1, self.fill_value, bstruct, self.config.mask.matrix[1:, 1:, 1:]) | |
1982 | + if iren.GetControlKey(): | |
1983 | + floodfill.floodfill_threshold(self.config.mask.matrix[1:, 1:, 1:], [[x, y, z]], 254, 255, 0, bstruct, self.config.mask.matrix[1:, 1:, 1:]) | |
1984 | + else: | |
1985 | + floodfill.floodfill_threshold(mask, [[x, y, z]], self.t0, self.t1, self.fill_value, bstruct, self.config.mask.matrix[1:, 1:, 1:]) | |
1986 | + | |
1982 | 1987 | self.viewer.slice_.aux_matrices['SELECT'] = self.config.mask.matrix[1:, 1:, 1:] |
1983 | 1988 | self.viewer.slice_.to_show_aux = 'SELECT' |
1984 | 1989 | ... | ... |