Commit 3321fe0f0fea4c19fd3fdf3719276767683eeec7

Authored by Thiago Franco de Moraes
1 parent 158a65d9
Exists in master

Checking if exist mask when showing or hiding mask in datanotebook

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
invesalius/gui/data_notebook.py
@@ -445,10 +445,12 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): @@ -445,10 +445,12 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin):
445 self.SetItemImage(key, 0) 445 self.SetItemImage(key, 0)
446 446
447 def __hide_current_mask(self, pubsub_evt): 447 def __hide_current_mask(self, pubsub_evt):
448 - self.SetItemImage(self.current_index, 0) 448 + if self.mask_list_index:
  449 + self.SetItemImage(self.current_index, 0)
449 450
450 def __show_current_mask(self, pubsub_evt): 451 def __show_current_mask(self, pubsub_evt):
451 - self.SetItemImage(self.current_index, 1) 452 + if self.mask_list_index:
  453 + self.SetItemImage(self.current_index, 1)
452 454
453 def __init_columns(self): 455 def __init_columns(self):
454 456