Frictions: display reach name in addition to the rk in combobox

This commit is contained in:
Dylan Jeannin committed 2026-10-26 11:50:22 +01:00
1 parent 4d9c4cb5d0
commit 03979a8bea
1 file changed
+13 -3
+13 -3
View File
@@ -105,9 +105,19 @@ class ComboBoxDelegate(QItemDelegate):
strickler strickler
) )
elif self._mode == "rk": elif self._mode == "rk":
self.editor.addItems( if self._data is None:
list(map(str, self._data.reach.get_rk())) self.editor.addItems(
) ["-"]
)
else:
self.editor.addItems(
list(
map(
lambda p: p.display_name(),
self._data.reach.profiles
)
)
)
self.editor.setCurrentText(str(index.data(Qt.DisplayRole))) self.editor.setCurrentText(str(index.data(Qt.DisplayRole)))
return self.editor return self.editor