Debugger: Hide breakpoint and callstack list if unused (#12266)

This commit is contained in:
Elad Ashkenazi 2022-06-22 00:42:42 +03:00 committed by GitHub
parent ccb2724fc4
commit 69ceebeb05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 0 deletions

View file

@ -860,6 +860,7 @@ void debugger_frame::UpdateUnitList()
if (emu_state == system_state::stopped)
{
ClearBreakpoints();
ClearCallStack();
}
OnSelectUnit();
@ -982,14 +983,18 @@ void debugger_frame::WritePanels()
}
int loc = m_misc_state->verticalScrollBar()->value();
int hloc = m_misc_state->horizontalScrollBar()->value();
m_misc_state->clear();
m_misc_state->setText(qstr(cpu->dump_misc()));
m_misc_state->verticalScrollBar()->setValue(loc);
m_misc_state->horizontalScrollBar()->setValue(hloc);
loc = m_regs->verticalScrollBar()->value();
hloc = m_regs->horizontalScrollBar()->value();
m_regs->clear();
m_regs->setText(qstr(cpu->dump_regs()));
m_regs->verticalScrollBar()->setValue(loc);
m_regs->horizontalScrollBar()->setValue(hloc);
Q_EMIT CallStackUpdateRequested(cpu->dump_callstack_list());
}