mirror of
https://github.com/x64dbg/x64dbg.git
synced 2025-02-25 15:42:29 +00:00
Revert "Add secondary sorting to Memory Map"
This reverts commit 6cd26dd3dd76d2679925bda89ab81a6b7034ba0b.
This commit is contained in:
parent
6cd26dd3dd
commit
d5901879a7
@ -195,37 +195,6 @@ void MemoryMapView::setupContextMenu()
|
||||
connect(Config(), SIGNAL(shortcutsUpdated()), this, SLOT(refreshShortcutsSlot()));
|
||||
}
|
||||
|
||||
void MemoryMapView::sortRows(int column, bool ascending)
|
||||
{
|
||||
auto sortFn = mColumnSortFunctions.at(column);
|
||||
auto addressSortFn = mColumnSortFunctions.at(0);
|
||||
std::vector<size_t> index;
|
||||
index.resize(mData.size());
|
||||
size_t i;
|
||||
for(i = 0; i < mData.size(); i++)
|
||||
{
|
||||
index[i] = i;
|
||||
}
|
||||
std::stable_sort(index.begin(), index.end(), [column, ascending, this, &sortFn, &addressSortFn](const size_t & a, const size_t & b)
|
||||
{
|
||||
if(column > 0 && QString::compare(mData.at(a).at(column).text, mData.at(b).at(column).text) == 0)
|
||||
{
|
||||
auto less = addressSortFn(mData.at(a).at(0).text, mData.at(b).at(0).text);
|
||||
return less;
|
||||
}
|
||||
|
||||
auto less = sortFn(mData.at(a).at(column).text, mData.at(b).at(column).text);
|
||||
return ascending ? less : !less;
|
||||
});
|
||||
auto copy1 = mData;
|
||||
auto copy2 = mIcon;
|
||||
for(i = 0; i < mData.size(); i++)
|
||||
{
|
||||
mData[i] = std::move(copy1[index[i]]);
|
||||
mIcon[i] = std::move(copy2[index[i]]);
|
||||
}
|
||||
}
|
||||
|
||||
void MemoryMapView::refreshShortcutsSlot()
|
||||
{
|
||||
mMemoryExecuteSingleshoot->setShortcut(ConfigShortcut("ActionToggleBreakpoint"));
|
||||
|
@ -12,9 +12,6 @@ public:
|
||||
QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h);
|
||||
void setupContextMenu();
|
||||
|
||||
protected:
|
||||
void sortRows(int column, bool ascending) override;
|
||||
|
||||
signals:
|
||||
void showReferences();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user