mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
DolphinWX: Get rid of wxGrid-based casts in the debugger.
This technically also fixes a memory leak in WatchView.cpp, because the table setting was done such that the grid wouldn't take ownership of the table, which means said table wouldn't be deleted in the grid's destructor.
This commit is contained in:
parent
01cb364c7a
commit
5ada887f94
7 changed files with 23 additions and 7 deletions
|
@ -215,7 +215,9 @@ wxGridCellAttr* CWatchTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKin
|
|||
CWatchView::CWatchView(wxWindow* parent, wxWindowID id)
|
||||
: wxGrid(parent, id)
|
||||
{
|
||||
SetTable(new CWatchTable(), false);
|
||||
m_watch_table = new CWatchTable();
|
||||
|
||||
SetTable(m_watch_table, true);
|
||||
SetRowLabelSize(0);
|
||||
SetColLabelSize(0);
|
||||
DisableDragRowSize();
|
||||
|
@ -229,7 +231,7 @@ void CWatchView::Update()
|
|||
if (PowerPC::GetState() != PowerPC::CPU_POWERDOWN)
|
||||
{
|
||||
ForceRefresh();
|
||||
((CWatchTable *)GetTable())->UpdateWatch();
|
||||
m_watch_table->UpdateWatch();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue