proper handling of sets without label,; closes #73

This commit is contained in:
Dominik Demuth 2023-05-23 06:40:08 +00:00
parent 8d06240205
commit 4e2938b2a2

View File

@ -89,8 +89,11 @@ class QGraceReader(QtWidgets.QDialog, Ui_Dialog):
item = iterator.value() item = iterator.value()
key = (item.data(0, QtCore.Qt.UserRole)) key = (item.data(0, QtCore.Qt.UserRole))
s = self._reader.dataset(*key) s = self._reader.dataset(*key)
label = self._reader.get_property(*key, 'legend').replace('"', '') label = self._reader.get_property(*key, 'legend')
# label = self._reader.graphs[key[0]].sets[key[1]]['legend'].replace('"', '') if label is None:
label = ''
else:
label = label.replace('"', '')
sd = s.data sd = s.data
sd = np.atleast_2d(sd) sd = np.atleast_2d(sd)
if s.type == 'xydy': if s.type == 'xydy':