diff options
author | archshift <admin@archshift.com> | 2015-01-10 22:39:00 -0800 |
---|---|---|
committer | archshift <admin@archshift.com> | 2015-01-11 21:47:28 -0800 |
commit | d670b7e52261c6cb4b53fb7f457f8ab4614ebc30 (patch) | |
tree | db543f0228cc9870c0c4eec3fa54ca61257bd9eb /src/citra_qt/debugger/callstack.cpp | |
parent | eacc2a501ba75a4f89e172eafddbf590f7851add (diff) |
Qt Callstack: Clear the callstack every time it's updated
This fixes the issue that old members of the callstack would stick around, even when the callstack shortened.
Diffstat (limited to 'src/citra_qt/debugger/callstack.cpp')
-rw-r--r-- | src/citra_qt/debugger/callstack.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/callstack.cpp b/src/citra_qt/debugger/callstack.cpp index 025a5896b..9bb22ca2e 100644 --- a/src/citra_qt/debugger/callstack.cpp +++ b/src/citra_qt/debugger/callstack.cpp @@ -33,6 +33,8 @@ void CallstackWidget::OnDebugModeEntered() u32 sp = app_core->GetReg(13); //stack pointer u32 ret_addr, call_addr, func_addr; + Clear(); + int counter = 0; for (u32 addr = 0x10000000; addr >= sp; addr -= 4) { @@ -76,3 +78,12 @@ void CallstackWidget::OnDebugModeLeft() { } + +void CallstackWidget::Clear() +{ + for (int row = 0; row < callstack_model->rowCount(); row++) { + for (int column = 0; column < callstack_model->columnCount(); column++) { + callstack_model->setItem(row, column, new QStandardItem()); + } + } +} |