Fix a memory leak in the breakpoint window.

Parent message alerts by the active window.  This way if another window is open it isn't pushed behind the main window.  We probably should parent the message alerts by the calling window instead, but this may be good enough.
Make sure there is only one instance of some modeless windows (Cheats Manager and Net Play).


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7257 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-02-27 02:27:43 +00:00
parent 449e79aea5
commit 217ee43063
12 changed files with 98 additions and 78 deletions

View File

@ -23,12 +23,14 @@
#include "VolumeHandler.h"
#include "ISOProperties.h"
#include "HW/Memmap.h"
#include "Frame.h"
#define _connect_macro_(b, f, c, s) (b)->Connect(wxID_ANY, (c), wxCommandEventHandler(f), (wxObject*)0, (wxEvtHandler*)s)
#define MAX_CHEAT_SEARCH_RESULTS_DISPLAY 256
extern std::vector<ActionReplay::ARCode> arCodes;
extern CFrame* main_frame;
// meh
static wxCheatsWindow *g_cheat_window;
@ -59,6 +61,11 @@ wxCheatsWindow::wxCheatsWindow(wxWindow* const parent)
Show();
}
wxCheatsWindow::~wxCheatsWindow()
{
main_frame->g_CheatsWindow = NULL;
}
void wxCheatsWindow::Init_ChildControls()
{
wxPanel* const panel = new wxPanel(this);