LogWindow: don't unconfigure logger on destruction

This was causing Dolphin to always save "WriteToWindow = False". Instead
of disabling logging to the window (a config value), tell LogManager
that there's no window to log to (a runtime state).
This commit is contained in:
Michael Maltese 2017-07-09 18:36:22 -07:00
parent ff83b13344
commit 06f1761f9f
2 changed files with 1 additions and 6 deletions

View File

@ -129,11 +129,7 @@ CLogWindow::~CLogWindow()
void CLogWindow::RemoveAllListeners() void CLogWindow::RemoveAllListeners()
{ {
if (!m_has_listeners) m_LogManager->RegisterListener(LogListener::LOG_WINDOW_LISTENER, nullptr);
return;
m_has_listeners = false;
m_LogManager->EnableListener(LogListener::LOG_WINDOW_LISTENER, false);
} }
void CLogWindow::SaveSettings() void CLogWindow::SaveSettings()

View File

@ -46,7 +46,6 @@ private:
LogManager* m_LogManager; LogManager* m_LogManager;
std::queue<std::pair<u8, wxString>> msgQueue; std::queue<std::pair<u8, wxString>> msgQueue;
bool m_LogAccess; bool m_LogAccess;
bool m_has_listeners = true;
// Controls // Controls
wxBoxSizer* sBottom; wxBoxSizer* sBottom;