Skip to content

Commit

Permalink
fix bug when label list is empty and want to add new label
Browse files Browse the repository at this point in the history
  • Loading branch information
delphinepilon committed Aug 8, 2024
1 parent 84fd51a commit 9da027b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SlicerCART/src/SlicerCART.py
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ def push_save(self):

if label_found == False:
# append
new_label = copy.deepcopy(self.label_config_yaml['labels'][0])
new_label = {'color_b': 10, 'color_g': 10, 'color_r': 255, 'lower_bound_HU': 30, 'name': 'ICH', 'upper_bound_HU': 90, 'value': 1}
new_label['name'] = self.name_line_edit.text
new_label['value'] = len(self.label_config_yaml['labels']) + 1
new_label['color_r'] = int(self.color_r_line_edit.text)
Expand Down

0 comments on commit 9da027b

Please sign in to comment.