Debugger: keep breakpoints ordered by address

Previously, breakpoints would move to the end of the list whenever
they were edited.
This commit is contained in:
Tillmann Karras 2024-08-03 19:09:58 +01:00
parent 7645cbff9a
commit f1366a4546
1 changed files with 6 additions and 1 deletions

View File

@ -207,8 +207,11 @@ void BreakpointWidget::OnClicked(QTableWidgetItem* item)
if (!item)
return;
if (item->column() == ADDRESS_COLUMN || item->column() == END_ADDRESS_COLUMN)
if (item->column() == SYMBOL_COLUMN || item->column() == ADDRESS_COLUMN ||
item->column() == END_ADDRESS_COLUMN)
{
return;
}
const u32 address = static_cast<u32>(m_table->item(item->row(), 0)->data(ADDRESS_ROLE).toUInt());
@ -351,6 +354,8 @@ void BreakpointWidget::Update()
i++;
}
m_table->sortItems(ADDRESS_COLUMN);
// Memory Breakpoints
for (const auto& mbp : memchecks.GetMemChecks())
{