From 46cd625ecb5ab9ac13a1d886e77df65fe5d377cb Mon Sep 17 00:00:00 2001 From: cristian64 Date: Fri, 24 May 2024 20:39:35 +0100 Subject: [PATCH] Select entire row when auto-selecting newly inserted rows. Row auto-selection was introduced in 43ec8492de, but it was overlooked that only one cell in each row was being selected. --- Source/GUI/MemWatcher/MemWatchWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/GUI/MemWatcher/MemWatchWidget.cpp b/Source/GUI/MemWatcher/MemWatchWidget.cpp index 478e0da0..08a29977 100644 --- a/Source/GUI/MemWatcher/MemWatchWidget.cpp +++ b/Source/GUI/MemWatcher/MemWatchWidget.cpp @@ -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);