mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
LateralSources: Debug of crash on RK selection
This commit is contained in:
1 parent
ddbaa0fb94
commit
81ff6372e9
1 file changed
+13
-3
@@ -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:
|
||||
value = text
|
||||
|
||||
@@ -222,15 +222,25 @@ class TableModel(PamhyrTableModel):
|
||||
)
|
||||
)
|
||||
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(
|
||||
SetBeginCommand(
|
||||
self._lst, self._tab, row, value
|
||||
self._lst, self._tab, row, _begin_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(
|
||||
SetEndCommand(
|
||||
self._lst, self._tab, row, value
|
||||
self._lst, self._tab, row, _end_rk
|
||||
)
|
||||
)
|
||||
except Exception as e:
|
||||
|
||||
Reference in new issue
Block a user