Fixed the comparison of log levels
This commit is contained in:
parent
9d1b206863
commit
8e524983d1
|
@ -215,7 +215,8 @@ void MySAX2Handler::logError ( const wxString &type, wxLogLevel level,
|
||||||
WrapXerces::toString ( e.getMessage() ).c_str(), mEOL.c_str() );
|
WrapXerces::toString ( e.getMessage() ).c_str(), mEOL.c_str() );
|
||||||
|
|
||||||
// Only save the first error position
|
// Only save the first error position
|
||||||
if ( level > mLevel || ( level == mLevel && mErrorPosition.first == 1
|
BOOST_STATIC_ASSERT ( wxLOG_Error < wxLOG_Warning );
|
||||||
|
if ( level < mLevel || ( level == mLevel && mErrorPosition.first == 1
|
||||||
&& mErrorPosition.second == 1 ) )
|
&& mErrorPosition.second == 1 ) )
|
||||||
{
|
{
|
||||||
mErrorPosition.first = e.getLineNumber();
|
mErrorPosition.first = e.getLineNumber();
|
||||||
|
|
|
@ -64,6 +64,7 @@ class MySAX2Handler : public DefaultHandler
|
||||||
{
|
{
|
||||||
mErrors.clear();
|
mErrors.clear();
|
||||||
mErrorPosition = std::make_pair ( 1, 1 );
|
mErrorPosition = std::make_pair ( 1, 1 );
|
||||||
|
mLevel = wxLOG_Max;
|
||||||
}
|
}
|
||||||
const wxString &getErrors() const
|
const wxString &getErrors() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue