Commit 4d0b9af27f7e57032f6e85f901aaaec3e56ec690
1 parent
cf08c213
Exists in
master
and in
54 other branches
It was not writting to the file if the mask was edited
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
invesalius/data/mask.py
... | ... | @@ -220,6 +220,7 @@ class Mask(): |
220 | 220 | mask['visible'] = self.is_shown |
221 | 221 | mask['mask_file'] = mask_filename |
222 | 222 | mask['mask_shape'] = self.matrix.shape |
223 | + mask['edited'] = self.was_edited | |
223 | 224 | |
224 | 225 | plist_filename = filename + '.plist' |
225 | 226 | #plist_filepath = os.path.join(dir_temp, plist_filename) |
... | ... | @@ -243,6 +244,8 @@ class Mask(): |
243 | 244 | self.is_shown = mask['visible'] |
244 | 245 | mask_file = mask['mask_file'] |
245 | 246 | shape = mask['mask_shape'] |
247 | + self.was_edited = mask.get('edited', False) | |
248 | + | |
246 | 249 | dirpath = os.path.abspath(os.path.split(filename)[0]) |
247 | 250 | path = os.path.join(dirpath, mask_file) |
248 | 251 | self._open_mask(path, tuple(shape)) | ... | ... |