mirror of https://gitlab.com/pamhyr/pamhyr2
LateralSources: Debug of crash on RK selection
parent
ddbaa0fb94
commit
81ff6372e9
|
|
@ -127,7 +127,7 @@ class ComboBoxDelegate(QItemDelegate):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
value = profiles[0].rk if len(profiles) > 0 else None
|
value = profiles[0].pamhyr_id if len(profiles) > 0 else None
|
||||||
else:
|
else:
|
||||||
value = text
|
value = text
|
||||||
|
|
||||||
|
|
@ -222,15 +222,25 @@ class TableModel(PamhyrTableModel):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif self._headers[column] == "begin_rk":
|
elif self._headers[column] == "begin_rk":
|
||||||
|
_edge = self._lst.get(self._tab, row).reach
|
||||||
|
_begin_rk = next(
|
||||||
|
p for p in _edge.reach.profiles
|
||||||
|
if p.pamhyr_id == value
|
||||||
|
)
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
SetBeginCommand(
|
SetBeginCommand(
|
||||||
self._lst, self._tab, row, value
|
self._lst, self._tab, row, _begin_rk
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif self._headers[column] == "end_rk":
|
elif self._headers[column] == "end_rk":
|
||||||
|
_edge = self._lst.get(self._tab, row).reach
|
||||||
|
_end_rk = next(
|
||||||
|
p for p in _edge.reach.profiles
|
||||||
|
if p.pamhyr_id == value
|
||||||
|
)
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
SetEndCommand(
|
SetEndCommand(
|
||||||
self._lst, self._tab, row, value
|
self._lst, self._tab, row, _end_rk
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue