Commit 55cc5637fabbc15ace0dd84c5fd5346ef8afee0c

Authored by Andrey Zhdanov
Committed by GitHub
1 parent 615280da
Exists in master

FIX: marker labels now correctly loaded from files (#388)

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
invesalius/gui/task_navigator.py
... ... @@ -1167,11 +1167,11 @@ class MarkersPanel(wx.Panel):
1167 1167 res += '\t'.join(map(lambda x: 'N/A' if x is None else str(x), (*position_world, *orientation_world)))
1168 1168 return res
1169 1169  
1170   - def from_string(self, str):
  1170 + def from_string(self, inp_str):
1171 1171 """Deserialize from a tab-separated string. If the string is not
1172 1172 properly formatted, might throw an exception and leave the object
1173 1173 in an inconsistent state."""
1174   - for field, str_val in zip(dataclasses.fields(self.__class__), str.split('\t')):
  1174 + for field, str_val in zip(dataclasses.fields(self.__class__), inp_str.split('\t')):
1175 1175 if field.type is float:
1176 1176 setattr(self, field.name, float(str_val))
1177 1177 if field.type is int:
... ... @@ -1254,7 +1254,7 @@ class MarkersPanel(wx.Panel):
1254 1254 self.lc.InsertColumn(1, 'X')
1255 1255 self.lc.InsertColumn(2, 'Y')
1256 1256 self.lc.InsertColumn(3, 'Z')
1257   - self.lc.InsertColumn(4, 'ID')
  1257 + self.lc.InsertColumn(4, 'Label')
1258 1258 self.lc.InsertColumn(5, 'Target')
1259 1259 self.lc.InsertColumn(6, 'Session')
1260 1260  
... ...