Skip to content

Commit 0aabebe

Browse files
committed
[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
1 parent 58bc125 commit 0aabebe

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

view/sharedcache/ui/dsctriage.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,13 @@ DSCTriageView::DSCTriageView(QWidget* parent, BinaryViewRef data) : QWidget(pare
111111
[loadImageTable, loadImagesWithAddr](bool) {
112112
auto selected = loadImageTable->selectionModel()->selectedRows();
113113
std::vector<uint64_t> addresses;
114-
for (const auto& row : selected)
115-
addresses.push_back(row.data().toString().toULongLong(nullptr, 16));
114+
for (const auto& idx : selected)
115+
{
116+
// Skip rows hidden by the filter.
117+
if (loadImageTable->isRowHidden(idx.row()))
118+
continue;
119+
addresses.push_back(idx.data().toString().toULongLong(nullptr, 16));
120+
}
116121
loadImagesWithAddr(addresses);
117122
});
118123
loadImageButton->setText("Load Selected");

0 commit comments

Comments
 (0)