logwindow: fix various brokenness related to the new log-to-window checkbox
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2707 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
d046b55d1b
commit
99c7c11f35
|
@ -213,7 +213,8 @@ void CLogWindow::OnClear(wxCommandEvent& WXUNUSED (event))
|
||||||
|
|
||||||
m_logSection.Enter();
|
m_logSection.Enter();
|
||||||
//msgQueue.Clear()
|
//msgQueue.Clear()
|
||||||
for (unsigned int i = 0; i < msgQueue.size(); i++)
|
int msgQueueSize = msgQueue.size();
|
||||||
|
for (unsigned int i = 0; i < msgQueueSize; i++)
|
||||||
msgQueue.pop();
|
msgQueue.pop();
|
||||||
m_logSection.Leave();
|
m_logSection.Leave();
|
||||||
|
|
||||||
|
@ -234,8 +235,8 @@ void CLogWindow::OnToggleAll(wxCommandEvent& WXUNUSED (event))
|
||||||
|
|
||||||
if (enable)
|
if (enable)
|
||||||
{
|
{
|
||||||
|
if (m_writeWindow)
|
||||||
m_logManager->addListener((LogTypes::LOG_TYPE)i, this);
|
m_logManager->addListener((LogTypes::LOG_TYPE)i, this);
|
||||||
|
|
||||||
if (m_writeFile)
|
if (m_writeFile)
|
||||||
m_logManager->addListener((LogTypes::LOG_TYPE)i, m_fileLog);
|
m_logManager->addListener((LogTypes::LOG_TYPE)i, m_fileLog);
|
||||||
if (m_writeConsole)
|
if (m_writeConsole)
|
||||||
|
@ -309,10 +310,10 @@ void CLogWindow::OnOptionsCheck(wxCommandEvent& event)
|
||||||
case IDM_WRITEWINDOW:
|
case IDM_WRITEWINDOW:
|
||||||
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i)
|
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i)
|
||||||
{
|
{
|
||||||
m_writeFile = event.IsChecked();
|
m_writeWindow = event.IsChecked();
|
||||||
if (m_checks->IsChecked(i))
|
if (m_checks->IsChecked(i))
|
||||||
{
|
{
|
||||||
if (m_writeFile)
|
if (m_writeWindow)
|
||||||
m_logManager->addListener((LogTypes::LOG_TYPE)i, this);
|
m_logManager->addListener((LogTypes::LOG_TYPE)i, this);
|
||||||
else
|
else
|
||||||
m_logManager->removeListener((LogTypes::LOG_TYPE)i, this);
|
m_logManager->removeListener((LogTypes::LOG_TYPE)i, this);
|
||||||
|
@ -347,8 +348,8 @@ void CLogWindow::OnLogCheck(wxCommandEvent& event)
|
||||||
int i = event.GetInt();
|
int i = event.GetInt();
|
||||||
if (m_checks->IsChecked(i))
|
if (m_checks->IsChecked(i))
|
||||||
{
|
{
|
||||||
|
if (m_writeWindow)
|
||||||
m_logManager->addListener((LogTypes::LOG_TYPE)i, this);
|
m_logManager->addListener((LogTypes::LOG_TYPE)i, this);
|
||||||
|
|
||||||
if (m_writeFile)
|
if (m_writeFile)
|
||||||
m_logManager->addListener((LogTypes::LOG_TYPE)i, m_fileLog);
|
m_logManager->addListener((LogTypes::LOG_TYPE)i, m_fileLog);
|
||||||
if (m_writeConsole)
|
if (m_writeConsole)
|
||||||
|
|
Loading…
Reference in New Issue