mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06: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:
@ -77,7 +77,9 @@ wxGridCellAttr *CDSPRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKi
|
||||
DSPRegisterView::DSPRegisterView(wxWindow *parent, wxWindowID id)
|
||||
: wxGrid(parent, id, wxDefaultPosition, wxSize(130, 120))
|
||||
{
|
||||
SetTable(new CDSPRegTable(), true);
|
||||
m_register_table = new CDSPRegTable();
|
||||
|
||||
SetTable(m_register_table, true);
|
||||
SetRowLabelSize(0);
|
||||
SetColLabelSize(0);
|
||||
DisableDragRowSize();
|
||||
@ -87,6 +89,6 @@ DSPRegisterView::DSPRegisterView(wxWindow *parent, wxWindowID id)
|
||||
|
||||
void DSPRegisterView::Update()
|
||||
{
|
||||
((CDSPRegTable *)GetTable())->UpdateCachedRegs();
|
||||
m_register_table->UpdateCachedRegs();
|
||||
ForceRefresh();
|
||||
}
|
||||
|
Reference in New Issue
Block a user