Merge pull request #5772 from ligfx/fixwxlogconfig
DolphinWX: fix logging crash + settings not being saved
This commit is contained in:
commit
b5dfde12ad
|
@ -89,7 +89,7 @@ void LogConfigWindow::CreateGUIControls()
|
||||||
|
|
||||||
void LogConfigWindow::LoadSettings()
|
void LogConfigWindow::LoadSettings()
|
||||||
{
|
{
|
||||||
m_verbosity->SetSelection(m_LogManager->GetLogLevel());
|
m_verbosity->SetSelection(m_LogManager->GetLogLevel() - 1);
|
||||||
|
|
||||||
// Get the logger output settings from the config ini file.
|
// Get the logger output settings from the config ini file.
|
||||||
m_writeFileCB->SetValue(m_LogManager->IsListenerEnabled(LogListener::FILE_LISTENER));
|
m_writeFileCB->SetValue(m_LogManager->IsListenerEnabled(LogListener::FILE_LISTENER));
|
||||||
|
@ -117,8 +117,7 @@ void LogConfigWindow::SaveSettings()
|
||||||
// If the verbosity changes while logging
|
// If the verbosity changes while logging
|
||||||
void LogConfigWindow::OnVerbosityChange(wxCommandEvent& event)
|
void LogConfigWindow::OnVerbosityChange(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
int v = m_verbosity->GetSelection() + 1;
|
m_LogManager->SetLogLevel(static_cast<LogTypes::LOG_LEVELS>(m_verbosity->GetSelection() + 1));
|
||||||
m_LogManager->SetLogLevel(static_cast<LogTypes::LOG_LEVELS>(v));
|
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue