Commit 020b8ecd authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Ensure consistent selection of the current item

Using setCurrentIndex() instead of SelectionModel::select() ensures that
the current item is always the selected item (and vice-versa). Previously,
when changing the order of the items it could happen that current item and
selected item differed.

GnuPG-bug-id: 6088
parent e1f59f5b
Pipeline #209285 passed with stage
in 4 minutes and 9 seconds
......@@ -140,7 +140,7 @@ private:
const QModelIndex mi = stringListModel.index(idx);
if (mi.isValid()) {
ui.listView->selectionModel()->select(mi, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
void swapRows(int r1, int r2)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment