Commit fc96ee1670143ca1aa729be8f7cb682e70ec83f8

Authored by Thiago Franco de Moraes
1 parent eeb5d439

Showing the 'visible icon' when opening an inv3 file

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
invesalius/control.py
@@ -510,8 +510,10 @@ class Controller(): @@ -510,8 +510,10 @@ class Controller():
510 Publisher.sendMessage('Add mask', 510 Publisher.sendMessage('Add mask',
511 (m.index, m.name, 511 (m.index, m.name,
512 m.threshold_range, m.colour)) 512 m.threshold_range, m.colour))
513 - self.Slice.current_mask = proj.mask_dict[mask_index]  
514 - Publisher.sendMessage('Show mask', (mask_index, True)) 513 + if m.is_shown:
  514 + self.Slice.current_mask = proj.mask_dict[mask_index]
  515 + Publisher.sendMessage('Show mask', (m.index, True))
  516 + Publisher.sendMessage('Change mask selected', m.index)
515 else: 517 else:
516 mask_name = const.MASK_NAME_PATTERN % (1,) 518 mask_name = const.MASK_NAME_PATTERN % (1,)
517 519