use LogLastRepetitionCountIfNeeded() instead of DoLogNumberOfRepeats() in logg.cpp too

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-10-24 22:19:28 +00:00
parent 5ed63bf59f
commit 0250efd6f4
3 changed files with 17 additions and 9 deletions

View File

@@ -275,11 +275,7 @@ void wxLogGui::Flush()
// do it right now to block any new calls to Flush() while we're here
m_bHasMessages = false;
unsigned repeatCount = 0;
if ( wxLog::GetRepetitionCounting() )
{
repeatCount = wxLog::DoLogNumberOfRepeats();
}
const unsigned repeatCount = wxLog::LogLastRepetitionCountIfNeeded();
wxString appName = wxTheApp->GetAppDisplayName();
@@ -317,7 +313,11 @@ void wxLogGui::Flush()
#if wxUSE_LOG_DIALOG
if ( repeatCount > 0 )
m_aMessages[nMsgCount-1] += wxString::Format(wxT(" (%s)"), m_aMessages[nMsgCount-2].c_str());
{
m_aMessages[nMsgCount - 1]
<< " (" << m_aMessages[nMsgCount - 2] << ")";
}
wxLogDialog dlg(NULL,
m_aMessages, m_aSeverity, m_aTimes,
title, style);