From cfb8215d6aa0703ad0d6c3046431536b4e37d810 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 2 Apr 2025 05:33:43 -0400 Subject: [SharedCache] Fix multi-row image selection not respecting the visibility of rows Before this we would load all images between the end and beginning because the model is does not have a filter proxy, but just hides the rows instead, we should move to a proxy --- view/sharedcache/ui/dsctriage.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'view/sharedcache/ui/dsctriage.cpp') diff --git a/view/sharedcache/ui/dsctriage.cpp b/view/sharedcache/ui/dsctriage.cpp index 297612d5..5c2162fb 100644 --- a/view/sharedcache/ui/dsctriage.cpp +++ b/view/sharedcache/ui/dsctriage.cpp @@ -111,8 +111,13 @@ DSCTriageView::DSCTriageView(QWidget* parent, BinaryViewRef data) : QWidget(pare [loadImageTable, loadImagesWithAddr](bool) { auto selected = loadImageTable->selectionModel()->selectedRows(); std::vector addresses; - for (const auto& row : selected) - addresses.push_back(row.data().toString().toULongLong(nullptr, 16)); + for (const auto& idx : selected) + { + // Skip rows hidden by the filter. + if (loadImageTable->isRowHidden(idx.row())) + continue; + addresses.push_back(idx.data().toString().toULongLong(nullptr, 16)); + } loadImagesWithAddr(addresses); }); loadImageButton->setText("Load Selected"); -- cgit v1.3.1