Skip to content

Commit

Permalink
Select entire row when auto-selecting newly inserted rows.
Browse files Browse the repository at this point in the history
Row auto-selection was introduced in 43ec849, but it was overlooked
that only one cell in each row was being selected.
  • Loading branch information
cristian64 committed May 24, 2024
1 parent 17285a2 commit 8b6b31a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/GUI/MemWatcher/MemWatchWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,8 @@ void MemWatchWidget::onRowsInserted(const QModelIndex& parent, const int first,
{
const QModelIndex firstIndex{m_watchModel->index(first, 0, parent)};
const QModelIndex lastIndex{m_watchModel->index(last, 0, parent)};
const QItemSelection selection{firstIndex, lastIndex};
const QItemSelection selection{firstIndex,
lastIndex.siblingAtColumn(MemWatchModel::WATCH_COL_NUM - 1)};

QItemSelectionModel* const selectionModel{m_watchView->selectionModel()};
selectionModel->select(selection, QItemSelectionModel::ClearAndSelect);
Expand Down

0 comments on commit 8b6b31a

Please sign in to comment.