LogConfigWindow: fix verbosity

This commit is contained in:
Michael Maltese 2017-07-09 18:35:40 -07:00
parent 07ab81e1bd
commit ff83b13344
1 changed files with 2 additions and 3 deletions

View File

@ -89,7 +89,7 @@ void LogConfigWindow::CreateGUIControls()
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.
m_writeFileCB->SetValue(m_LogManager->IsListenerEnabled(LogListener::FILE_LISTENER));
@ -117,8 +117,7 @@ void LogConfigWindow::SaveSettings()
// If the verbosity changes while logging
void LogConfigWindow::OnVerbosityChange(wxCommandEvent& event)
{
int v = m_verbosity->GetSelection() + 1;
m_LogManager->SetLogLevel(static_cast<LogTypes::LOG_LEVELS>(v));
m_LogManager->SetLogLevel(static_cast<LogTypes::LOG_LEVELS>(m_verbosity->GetSelection() + 1));
event.Skip();
}