diff --git a/Source/Core/DolphinWX/Src/LogWindow.cpp b/Source/Core/DolphinWX/Src/LogWindow.cpp index 694e0cc8e8..4947c294db 100644 --- a/Source/Core/DolphinWX/Src/LogWindow.cpp +++ b/Source/Core/DolphinWX/Src/LogWindow.cpp @@ -30,6 +30,7 @@ #define UPDATETIME 100 BEGIN_EVENT_TABLE(CLogWindow, wxDialog) + EVT_CLOSE(CLogWindow::OnClose) EVT_TEXT_ENTER(IDM_SUBMITCMD, CLogWindow::OnSubmit) EVT_BUTTON(IDM_CLEARLOG, CLogWindow::OnClear) EVT_BUTTON(IDM_TOGGLEALL, CLogWindow::OnToggleAll) @@ -129,6 +130,12 @@ CLogWindow::~CLogWindow() SaveSettings(); } +void CLogWindow::OnClose(wxCloseEvent& event) +{ + wxGetApp().GetCFrame()->ToggleLogWindow(false); + event.Skip(); +} + void CLogWindow::SaveSettings() { IniFile ini; diff --git a/Source/Core/DolphinWX/Src/LogWindow.h b/Source/Core/DolphinWX/Src/LogWindow.h index da1e6eabca..00075e0e72 100644 --- a/Source/Core/DolphinWX/Src/LogWindow.h +++ b/Source/Core/DolphinWX/Src/LogWindow.h @@ -66,6 +66,7 @@ private: DECLARE_EVENT_TABLE() void CreateGUIControls(); + void OnClose(wxCloseEvent& event); void OnSubmit(wxCommandEvent& event); void OnOptionsCheck(wxCommandEvent& event); void OnLogCheck(wxCommandEvent& event);