From 0ecca4b7de6806679049e6acb7cc7435200d8714 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Fri, 6 Apr 2012 09:52:18 +0000 Subject: [PATCH] Workaround for the debug build assertion problem discussed in r5141. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5143 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/gui/RecentIsoList.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pcsx2/gui/RecentIsoList.cpp b/pcsx2/gui/RecentIsoList.cpp index 34a2c284c2..492a08fd1a 100644 --- a/pcsx2/gui/RecentIsoList.cpp +++ b/pcsx2/gui/RecentIsoList.cpp @@ -121,15 +121,14 @@ void RecentIsoManager::Repopulate() m_Separator = m_Menu->AppendSeparator(); - // The following line is important - // Update: It also makes debug WX assert on Windows. Can we review wether this is needed in Linux at all? - // Below is a version that doesn't trigger the assert (WX on Windows complains about an empty string), but - // ideally this line should get removed. - - //wxString temp = L"isupresswarnings"; - //m_Menu->Remove( m_Menu->Append( -1, temp ) ); + // From arcum's comment on r5141 + // What was happening is that when all the radio button menu items in a group are deleted, + // wxwidgets deletes the group, but when you start adding radio menu items again, + // it trys to add them to a group that doesn't exist. Since the group doesn't exist, + // it starts a new group, but it also spews a couple warnings about it in Linux. +#ifdef __LINUX__ m_Menu->Remove( m_Menu->Append( -1, wxEmptyString ) ); - +#endif //Note: the internal recent iso list (m_Items) has the most recent item last (also at the INI file) // but the menu is composed in reverse order such that the most recent item appears at the top. for( int i=cnt-1; i>=0; --i )