mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-13 03:29:55 +00:00
GUI: Fix wx assert on first right-click in game list
Don't know why it was working before. Anyway, it seems ugly and it probably should be handled differently (the whole function, or whole GUI ;P).
This commit is contained in:
parent
d01235ce2d
commit
0d6297fef0
1 changed files with 3 additions and 4 deletions
|
@ -49,7 +49,6 @@ GameViewer::GameViewer(wxWindow* parent) : wxListView(parent)
|
||||||
m_sortAscending = true;
|
m_sortAscending = true;
|
||||||
m_path = "/dev_hdd0/game/";
|
m_path = "/dev_hdd0/game/";
|
||||||
m_popup = new wxMenu();
|
m_popup = new wxMenu();
|
||||||
m_popup->Append(0, _T("Remove Game"));
|
|
||||||
|
|
||||||
Bind(wxEVT_LIST_ITEM_ACTIVATED, &GameViewer::DClick, this);
|
Bind(wxEVT_LIST_ITEM_ACTIVATED, &GameViewer::DClick, this);
|
||||||
Bind(wxEVT_LIST_COL_CLICK, &GameViewer::OnColClick, this);
|
Bind(wxEVT_LIST_COL_CLICK, &GameViewer::OnColClick, this);
|
||||||
|
@ -227,9 +226,9 @@ void GameViewer::DClick(wxListEvent& event)
|
||||||
|
|
||||||
void GameViewer::RightClick(wxListEvent& event)
|
void GameViewer::RightClick(wxListEvent& event)
|
||||||
{
|
{
|
||||||
m_popup->Destroy(0);
|
for (wxMenuItem *item : m_popup->GetMenuItems()) {
|
||||||
m_popup->Destroy(1);
|
m_popup->Destroy(item);
|
||||||
m_popup->Destroy(2);
|
}
|
||||||
|
|
||||||
wxMenuItem* boot_item = new wxMenuItem(m_popup, 0, _T("Boot"));
|
wxMenuItem* boot_item = new wxMenuItem(m_popup, 0, _T("Boot"));
|
||||||
#if defined (_WIN32)
|
#if defined (_WIN32)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue