Surpress the giant opencascade stats print unless we are tracing
Also catch Warn level messages to set a flag and print the relevant there were warning message Fixes https://gitlab.com/kicad/code/kicad/-/issues/8613
This commit is contained in:
parent
056349e5ea
commit
c2e7524cb6
|
@ -32,6 +32,7 @@
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include <base_units.h>
|
#include <base_units.h>
|
||||||
#include <filename_resolver.h>
|
#include <filename_resolver.h>
|
||||||
|
#include <trace_helpers.h>
|
||||||
|
|
||||||
#include <Message.hxx> // OpenCascade messenger
|
#include <Message.hxx> // OpenCascade messenger
|
||||||
#include <Message_PrinterOStream.hxx> // OpenCascade output messenger
|
#include <Message_PrinterOStream.hxx> // OpenCascade output messenger
|
||||||
|
@ -77,7 +78,8 @@ protected:
|
||||||
const Message_Gravity theGravity ) const override
|
const Message_Gravity theGravity ) const override
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if( theGravity >= Message_Info )
|
if( theGravity >= Message_Warning
|
||||||
|
|| ( wxLog::IsAllowedTraceMask( traceKiCad2Step ) && theGravity == Message_Info ) )
|
||||||
{
|
{
|
||||||
ReportMessage( theString.ToCString() );
|
ReportMessage( theString.ToCString() );
|
||||||
|
|
||||||
|
@ -89,6 +91,9 @@ protected:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( theGravity == Message_Warning )
|
||||||
|
m_converter->SetWarn();
|
||||||
|
|
||||||
if( theGravity >= Message_Alarm )
|
if( theGravity >= Message_Alarm )
|
||||||
m_converter->SetError();
|
m_converter->SetError();
|
||||||
|
|
||||||
|
@ -105,6 +110,7 @@ EXPORTER_STEP::EXPORTER_STEP( BOARD* aBoard, const EXPORTER_STEP_PARAMS& aParams
|
||||||
m_params( aParams ),
|
m_params( aParams ),
|
||||||
m_error( false ),
|
m_error( false ),
|
||||||
m_fail( false ),
|
m_fail( false ),
|
||||||
|
m_warn( false ),
|
||||||
m_hasDrillOrigin( false ),
|
m_hasDrillOrigin( false ),
|
||||||
m_hasGridOrigin( false ),
|
m_hasGridOrigin( false ),
|
||||||
m_board( aBoard ),
|
m_board( aBoard ),
|
||||||
|
@ -361,7 +367,7 @@ bool EXPORTER_STEP::Export()
|
||||||
msg = _( "Unable to create STEP file.\n"
|
msg = _( "Unable to create STEP file.\n"
|
||||||
"Check that the board has a valid outline and models." );
|
"Check that the board has a valid outline and models." );
|
||||||
}
|
}
|
||||||
else if( m_error )
|
else if( m_error || m_warn )
|
||||||
{
|
{
|
||||||
msg = _( "STEP file has been created, but there are warnings." );
|
msg = _( "STEP file has been created, but there are warnings." );
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,8 @@ public:
|
||||||
wxString m_outputFile;
|
wxString m_outputFile;
|
||||||
|
|
||||||
void SetError() { m_error = true; }
|
void SetError() { m_error = true; }
|
||||||
void SetFail() { m_error = true; }
|
void SetFail() { m_fail = true; }
|
||||||
|
void SetWarn() { m_warn = true; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool composePCB();
|
bool composePCB();
|
||||||
|
@ -84,6 +85,7 @@ private:
|
||||||
|
|
||||||
bool m_error;
|
bool m_error;
|
||||||
bool m_fail;
|
bool m_fail;
|
||||||
|
bool m_warn;
|
||||||
|
|
||||||
bool m_hasDrillOrigin;
|
bool m_hasDrillOrigin;
|
||||||
bool m_hasGridOrigin;
|
bool m_hasGridOrigin;
|
||||||
|
|
Loading…
Reference in New Issue