Fix compil issues, especially on Windows:
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition. Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency. Fix compil warnings and some other compil issues.
This commit is contained in:
parent
21469efa63
commit
b7cd0c54c2
|
@ -30,7 +30,7 @@
|
||||||
#define STATUS_TEXT_REPORTER_H_
|
#define STATUS_TEXT_REPORTER_H_
|
||||||
|
|
||||||
#include <reporter.h>
|
#include <reporter.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* STATUS_TEXT_REPORTER
|
* STATUS_TEXT_REPORTER
|
||||||
* is a wrapper for reporting to a wxString in a wxFrame status text.
|
* is a wrapper for reporting to a wxString in a wxFrame status text.
|
||||||
|
@ -50,7 +50,7 @@ public:
|
||||||
m_hasMessage = false;
|
m_hasMessage = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED ) override
|
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) override
|
||||||
{
|
{
|
||||||
if( !aText.IsEmpty() )
|
if( !aText.IsEmpty() )
|
||||||
m_hasMessage = true;
|
m_hasMessage = true;
|
||||||
|
|
|
@ -565,7 +565,7 @@ bool EnsureFileDirectoryExists( wxFileName* aTargetFullFileName,
|
||||||
msg.Printf( _( "Cannot make path \"%s\" absolute with respect to \"%s\"." ),
|
msg.Printf( _( "Cannot make path \"%s\" absolute with respect to \"%s\"." ),
|
||||||
aTargetFullFileName->GetPath(),
|
aTargetFullFileName->GetPath(),
|
||||||
baseFilePath );
|
baseFilePath );
|
||||||
aReporter->Report( msg, SEVERITY_ERROR );
|
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -581,7 +581,7 @@ bool EnsureFileDirectoryExists( wxFileName* aTargetFullFileName,
|
||||||
if( aReporter )
|
if( aReporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Output directory \"%s\" created.\n" ), outputPath );
|
msg.Printf( _( "Output directory \"%s\" created.\n" ), outputPath );
|
||||||
aReporter->Report( msg, SEVERITY_INFO );
|
aReporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -590,7 +590,7 @@ bool EnsureFileDirectoryExists( wxFileName* aTargetFullFileName,
|
||||||
if( aReporter )
|
if( aReporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Cannot create output directory \"%s\".\n" ), outputPath );
|
msg.Printf( _( "Cannot create output directory \"%s\".\n" ), outputPath );
|
||||||
aReporter->Report( msg, SEVERITY_ERROR );
|
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -132,11 +132,11 @@ void WX_HTML_REPORT_PANEL::scrollToBottom()
|
||||||
|
|
||||||
void WX_HTML_REPORT_PANEL::updateBadges()
|
void WX_HTML_REPORT_PANEL::updateBadges()
|
||||||
{
|
{
|
||||||
int count = Count( SEVERITY_ERROR );
|
int count = Count(RPT_SEVERITY_ERROR );
|
||||||
m_errorsBadge->SetBitmap( MakeBadge( SEVERITY_ERROR, count, m_errorsBadge, 2 ) );
|
m_errorsBadge->SetBitmap( MakeBadge( RPT_SEVERITY_ERROR, count, m_errorsBadge, 2 ) );
|
||||||
|
|
||||||
count = Count( SEVERITY_WARNING );
|
count = Count(RPT_SEVERITY_WARNING );
|
||||||
m_warningsBadge->SetBitmap( MakeBadge( SEVERITY_WARNING, count, m_warningsBadge, 2 ) );
|
m_warningsBadge->SetBitmap( MakeBadge( RPT_SEVERITY_WARNING, count, m_warningsBadge, 2 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,19 +173,19 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
|
||||||
|
|
||||||
switch( aLine.severity )
|
switch( aLine.severity )
|
||||||
{
|
{
|
||||||
case SEVERITY_ERROR:
|
case RPT_SEVERITY_ERROR:
|
||||||
retv = "<font color=\"red\" size=2><b>" + _( "Error: " ) + "</b></font><font size=2>" +
|
retv = "<font color=\"red\" size=2><b>" + _( "Error: " ) + "</b></font><font size=2>" +
|
||||||
aLine.message + "</font><br>";
|
aLine.message + "</font><br>";
|
||||||
break;
|
break;
|
||||||
case SEVERITY_WARNING:
|
case RPT_SEVERITY_WARNING:
|
||||||
retv = "<font color=\"orange\" size=2><b>" + _( "Warning: " ) +
|
retv = "<font color=\"orange\" size=2><b>" + _( "Warning: " ) +
|
||||||
"</b></font><font size=2>" + aLine.message + "</font><br>";
|
"</b></font><font size=2>" + aLine.message + "</font><br>";
|
||||||
break;
|
break;
|
||||||
case SEVERITY_INFO:
|
case RPT_SEVERITY_INFO:
|
||||||
retv = "<font color=\"dark gray\" size=2><b>" + _( "Info: " ) + "</b>" + aLine.message +
|
retv = "<font color=\"dark gray\" size=2><b>" + _( "Info: " ) + "</b>" + aLine.message +
|
||||||
"</font><br>";
|
"</font><br>";
|
||||||
break;
|
break;
|
||||||
case SEVERITY_ACTION:
|
case RPT_SEVERITY_ACTION:
|
||||||
retv = "<font color=\"dark green\" size=2>" + aLine.message + "</font><br>";
|
retv = "<font color=\"dark green\" size=2>" + aLine.message + "</font><br>";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -200,11 +200,11 @@ wxString WX_HTML_REPORT_PANEL::generatePlainText( const REPORT_LINE& aLine )
|
||||||
{
|
{
|
||||||
switch( aLine.severity )
|
switch( aLine.severity )
|
||||||
{
|
{
|
||||||
case SEVERITY_ERROR:
|
case RPT_SEVERITY_ERROR:
|
||||||
return _( "Error: " ) + aLine.message + wxT( "\n" );
|
return _( "Error: " ) + aLine.message + wxT( "\n" );
|
||||||
case SEVERITY_WARNING:
|
case RPT_SEVERITY_WARNING:
|
||||||
return _( "Warning: " ) + aLine.message + wxT( "\n" );
|
return _( "Warning: " ) + aLine.message + wxT( "\n" );
|
||||||
case SEVERITY_INFO:
|
case RPT_SEVERITY_INFO:
|
||||||
return _( "Info: " ) + aLine.message + wxT( "\n" );
|
return _( "Info: " ) + aLine.message + wxT( "\n" );
|
||||||
default:
|
default:
|
||||||
return aLine.message + wxT( "\n" );
|
return aLine.message + wxT( "\n" );
|
||||||
|
@ -237,15 +237,15 @@ void WX_HTML_REPORT_PANEL::onMenuEvent( wxMenuEvent& event )
|
||||||
|
|
||||||
|
|
||||||
// Don't globally define this; different facilities use different definitions of "ALL"
|
// Don't globally define this; different facilities use different definitions of "ALL"
|
||||||
static int SEVERITY_ALL = SEVERITY_WARNING | SEVERITY_ERROR | SEVERITY_INFO | SEVERITY_ACTION;
|
static int RPT_SEVERITY_ALL = RPT_SEVERITY_WARNING | RPT_SEVERITY_ERROR | RPT_SEVERITY_INFO | RPT_SEVERITY_ACTION;
|
||||||
|
|
||||||
|
|
||||||
void WX_HTML_REPORT_PANEL::onCheckBoxShowAll( wxCommandEvent& event )
|
void WX_HTML_REPORT_PANEL::onCheckBoxShowAll( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( event.IsChecked() )
|
if( event.IsChecked() )
|
||||||
m_severities = SEVERITY_ALL;
|
m_severities = RPT_SEVERITY_ALL;
|
||||||
else
|
else
|
||||||
m_severities = SEVERITY_ERROR;
|
m_severities = RPT_SEVERITY_ERROR;
|
||||||
|
|
||||||
syncCheckboxes();
|
syncCheckboxes();
|
||||||
Flush( true );
|
Flush( true );
|
||||||
|
@ -254,20 +254,20 @@ void WX_HTML_REPORT_PANEL::onCheckBoxShowAll( wxCommandEvent& event )
|
||||||
|
|
||||||
void WX_HTML_REPORT_PANEL::syncCheckboxes()
|
void WX_HTML_REPORT_PANEL::syncCheckboxes()
|
||||||
{
|
{
|
||||||
m_checkBoxShowAll->SetValue( m_severities == SEVERITY_ALL );
|
m_checkBoxShowAll->SetValue( m_severities == RPT_SEVERITY_ALL );
|
||||||
m_checkBoxShowWarnings->SetValue( m_severities & SEVERITY_WARNING );
|
m_checkBoxShowWarnings->SetValue( m_severities & RPT_SEVERITY_WARNING );
|
||||||
m_checkBoxShowErrors->SetValue( m_severities & SEVERITY_ERROR );
|
m_checkBoxShowErrors->SetValue( m_severities & RPT_SEVERITY_ERROR );
|
||||||
m_checkBoxShowInfos->SetValue( m_severities & SEVERITY_INFO );
|
m_checkBoxShowInfos->SetValue( m_severities & RPT_SEVERITY_INFO );
|
||||||
m_checkBoxShowActions->SetValue( m_severities & SEVERITY_ACTION );
|
m_checkBoxShowActions->SetValue( m_severities & RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WX_HTML_REPORT_PANEL::onCheckBoxShowWarnings( wxCommandEvent& event )
|
void WX_HTML_REPORT_PANEL::onCheckBoxShowWarnings( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( event.IsChecked() )
|
if( event.IsChecked() )
|
||||||
m_severities |= SEVERITY_WARNING;
|
m_severities |= RPT_SEVERITY_WARNING;
|
||||||
else
|
else
|
||||||
m_severities &= ~SEVERITY_WARNING;
|
m_severities &= ~RPT_SEVERITY_WARNING;
|
||||||
|
|
||||||
syncCheckboxes();
|
syncCheckboxes();
|
||||||
Flush( true );
|
Flush( true );
|
||||||
|
@ -277,9 +277,9 @@ void WX_HTML_REPORT_PANEL::onCheckBoxShowWarnings( wxCommandEvent& event )
|
||||||
void WX_HTML_REPORT_PANEL::onCheckBoxShowErrors( wxCommandEvent& event )
|
void WX_HTML_REPORT_PANEL::onCheckBoxShowErrors( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( event.IsChecked() )
|
if( event.IsChecked() )
|
||||||
m_severities |= SEVERITY_ERROR;
|
m_severities |= RPT_SEVERITY_ERROR;
|
||||||
else
|
else
|
||||||
m_severities &= ~SEVERITY_ERROR;
|
m_severities &= ~RPT_SEVERITY_ERROR;
|
||||||
|
|
||||||
syncCheckboxes();
|
syncCheckboxes();
|
||||||
Flush( true );
|
Flush( true );
|
||||||
|
@ -289,9 +289,9 @@ void WX_HTML_REPORT_PANEL::onCheckBoxShowErrors( wxCommandEvent& event )
|
||||||
void WX_HTML_REPORT_PANEL::onCheckBoxShowInfos( wxCommandEvent& event )
|
void WX_HTML_REPORT_PANEL::onCheckBoxShowInfos( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( event.IsChecked() )
|
if( event.IsChecked() )
|
||||||
m_severities |= SEVERITY_INFO;
|
m_severities |= RPT_SEVERITY_INFO;
|
||||||
else
|
else
|
||||||
m_severities &= ~SEVERITY_INFO;
|
m_severities &= ~RPT_SEVERITY_INFO;
|
||||||
|
|
||||||
syncCheckboxes();
|
syncCheckboxes();
|
||||||
Flush( true );
|
Flush( true );
|
||||||
|
@ -301,9 +301,9 @@ void WX_HTML_REPORT_PANEL::onCheckBoxShowInfos( wxCommandEvent& event )
|
||||||
void WX_HTML_REPORT_PANEL::onCheckBoxShowActions( wxCommandEvent& event )
|
void WX_HTML_REPORT_PANEL::onCheckBoxShowActions( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( event.IsChecked() )
|
if( event.IsChecked() )
|
||||||
m_severities |= SEVERITY_ACTION;
|
m_severities |= RPT_SEVERITY_ACTION;
|
||||||
else
|
else
|
||||||
m_severities &= ~SEVERITY_ACTION;
|
m_severities &= ~RPT_SEVERITY_ACTION;
|
||||||
|
|
||||||
syncCheckboxes();
|
syncCheckboxes();
|
||||||
Flush( true );
|
Flush( true );
|
||||||
|
@ -363,7 +363,7 @@ void WX_HTML_REPORT_PANEL::SetLabel( const wxString& aLabel )
|
||||||
void WX_HTML_REPORT_PANEL::SetVisibleSeverities( int aSeverities )
|
void WX_HTML_REPORT_PANEL::SetVisibleSeverities( int aSeverities )
|
||||||
{
|
{
|
||||||
if( aSeverities < 0 )
|
if( aSeverities < 0 )
|
||||||
m_severities = SEVERITY_ALL;
|
m_severities = RPT_SEVERITY_ALL;
|
||||||
else
|
else
|
||||||
m_severities = aSeverities;
|
m_severities = aSeverities;
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ REPORTER& WX_HTML_PANEL_REPORTER::ReportHead( const wxString& aText, SEVERITY aS
|
||||||
|
|
||||||
bool WX_HTML_PANEL_REPORTER::HasMessage() const
|
bool WX_HTML_PANEL_REPORTER::HasMessage() const
|
||||||
{
|
{
|
||||||
return m_panel->Count( SEVERITY_ERROR | SEVERITY_WARNING ) > 0;
|
return m_panel->Count( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
REPORTER& NULL_REPORTER::Report( const wxString& aText, SEVERITY aSeverity )
|
REPORTER& NULL_REPORTER::Report( const wxString& aText, SEVERITY aSeverity )
|
||||||
|
@ -116,11 +116,13 @@ REPORTER& STDOUT_REPORTER::Report( const wxString& aText, SEVERITY aSeverity )
|
||||||
{
|
{
|
||||||
switch( aSeverity )
|
switch( aSeverity )
|
||||||
{
|
{
|
||||||
case SEVERITY_UNDEFINED: std::cout << "SEVERITY_UNDEFINED: "; break;
|
case RPT_SEVERITY_UNDEFINED: std::cout << "SEVERITY_UNDEFINED: "; break;
|
||||||
case SEVERITY_INFO: std::cout << "SEVERITY_INFO: "; break;
|
case RPT_SEVERITY_INFO: std::cout << "SEVERITY_INFO: "; break;
|
||||||
case SEVERITY_WARNING: std::cout << "SEVERITY_WARNING: "; break;
|
case RPT_SEVERITY_WARNING: std::cout << "SEVERITY_WARNING: "; break;
|
||||||
case SEVERITY_ERROR: std::cout << "SEVERITY_ERROR: "; break;
|
case RPT_SEVERITY_ERROR: std::cout << "SEVERITY_ERROR: "; break;
|
||||||
case SEVERITY_ACTION: std::cout << "SEVERITY_ACTION: "; break;
|
case RPT_SEVERITY_ACTION: std::cout << "SEVERITY_ACTION: "; break;
|
||||||
|
case RPT_SEVERITY_EXCLUSION:
|
||||||
|
case RPT_SEVERITY_IGNORE: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << aText << std::endl;
|
std::cout << aText << std::endl;
|
||||||
|
|
|
@ -64,20 +64,20 @@ wxBitmap MakeBadge( SEVERITY aStyle, int aCount, wxWindow* aWindow, int aDepth )
|
||||||
|
|
||||||
switch( aStyle )
|
switch( aStyle )
|
||||||
{
|
{
|
||||||
case SEVERITY_ERROR:
|
case RPT_SEVERITY_ERROR:
|
||||||
badgeColour = *wxRED;
|
badgeColour = *wxRED;
|
||||||
textColour = *wxWHITE;
|
textColour = *wxWHITE;
|
||||||
break;
|
break;
|
||||||
case SEVERITY_WARNING:
|
case RPT_SEVERITY_WARNING:
|
||||||
badgeColour = *wxYELLOW;
|
badgeColour = *wxYELLOW;
|
||||||
textColour = *wxBLACK;
|
textColour = *wxBLACK;
|
||||||
break;
|
break;
|
||||||
case SEVERITY_ACTION:
|
case RPT_SEVERITY_ACTION:
|
||||||
badgeColour = *wxGREEN;
|
badgeColour = *wxGREEN;
|
||||||
textColour = *wxWHITE;
|
textColour = *wxWHITE;
|
||||||
break;
|
break;
|
||||||
case SEVERITY_EXCLUSION:
|
case RPT_SEVERITY_EXCLUSION:
|
||||||
case SEVERITY_INFO:
|
case RPT_SEVERITY_INFO:
|
||||||
default:
|
default:
|
||||||
badgeColour = *wxLIGHT_GREY;
|
badgeColour = *wxLIGHT_GREY;
|
||||||
textColour = *wxBLACK;
|
textColour = *wxBLACK;
|
||||||
|
|
|
@ -114,7 +114,7 @@ void SCH_EDIT_FRAME::AnnotateComponents( bool aAnnotateSchematic,
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "%d duplicate time stamps were found and replaced." ), count );
|
msg.Printf( _( "%d duplicate time stamps were found and replaced." ), count );
|
||||||
aReporter.ReportTail( msg, SEVERITY_WARNING );
|
aReporter.ReportTail( msg, RPT_SEVERITY_WARNING );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,12 +221,12 @@ void SCH_EDIT_FRAME::AnnotateComponents( bool aAnnotateSchematic,
|
||||||
newRef );
|
newRef );
|
||||||
}
|
}
|
||||||
|
|
||||||
aReporter.Report( msg, SEVERITY_ACTION );
|
aReporter.Report( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Final control (just in case ... ).
|
// Final control (just in case ... ).
|
||||||
if( !CheckAnnotate( aReporter, !aAnnotateSchematic ) )
|
if( !CheckAnnotate( aReporter, !aAnnotateSchematic ) )
|
||||||
aReporter.ReportTail( _( "Annotation complete." ), SEVERITY_ACTION );
|
aReporter.ReportTail( _( "Annotation complete." ), RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
// Update on screen references, that can be modified by previous calculations:
|
// Update on screen references, that can be modified by previous calculations:
|
||||||
g_CurrentSheet->UpdateAllScreenReferences();
|
g_CurrentSheet->UpdateAllScreenReferences();
|
||||||
|
|
|
@ -525,7 +525,7 @@ int SCH_REFERENCE_LIST::CheckAnnotation( REPORTER& aReporter )
|
||||||
tmp );
|
tmp );
|
||||||
}
|
}
|
||||||
|
|
||||||
aReporter.Report( msg, SEVERITY_WARNING );
|
aReporter.Report( msg, RPT_SEVERITY_WARNING );
|
||||||
error++;
|
error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -547,7 +547,7 @@ int SCH_REFERENCE_LIST::CheckAnnotation( REPORTER& aReporter )
|
||||||
flatList[ii].m_Unit,
|
flatList[ii].m_Unit,
|
||||||
flatList[ii].GetLibPart()->GetUnitCount() );
|
flatList[ii].GetLibPart()->GetUnitCount() );
|
||||||
|
|
||||||
aReporter.Report( msg, SEVERITY_ERROR );
|
aReporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
error++;
|
error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ int SCH_REFERENCE_LIST::CheckAnnotation( REPORTER& aReporter )
|
||||||
tmp );
|
tmp );
|
||||||
}
|
}
|
||||||
|
|
||||||
aReporter.Report( msg, SEVERITY_ERROR );
|
aReporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
error++;
|
error++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -621,7 +621,7 @@ int SCH_REFERENCE_LIST::CheckAnnotation( REPORTER& aReporter )
|
||||||
tmp );
|
tmp );
|
||||||
}
|
}
|
||||||
|
|
||||||
aReporter.Report( msg, SEVERITY_ERROR );
|
aReporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
error++;
|
error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -640,7 +640,7 @@ int SCH_REFERENCE_LIST::CheckAnnotation( REPORTER& aReporter )
|
||||||
LIB_PART::SubReference( flatList[next].m_Unit ),
|
LIB_PART::SubReference( flatList[next].m_Unit ),
|
||||||
flatList[next].m_Value->GetText() );
|
flatList[next].m_Value->GetText() );
|
||||||
|
|
||||||
aReporter.Report( msg, SEVERITY_ERROR );
|
aReporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
error++;
|
error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -489,7 +489,7 @@ void DIALOG_ERC::TestErc( REPORTER& aReporter )
|
||||||
if( m_parent->CheckAnnotate( aReporter, false ) )
|
if( m_parent->CheckAnnotate( aReporter, false ) )
|
||||||
{
|
{
|
||||||
if( aReporter.HasMessage() )
|
if( aReporter.HasMessage() )
|
||||||
aReporter.ReportTail( _( "Annotation required!" ), SEVERITY_ERROR );
|
aReporter.ReportTail( _( "Annotation required!" ), RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -622,7 +622,7 @@ void DIALOG_ERC::TestErc( REPORTER& aReporter )
|
||||||
m_parent->GetCanvas()->Refresh();
|
m_parent->GetCanvas()->Refresh();
|
||||||
|
|
||||||
// Display message
|
// Display message
|
||||||
aReporter.ReportTail( _( "Finished" ), SEVERITY_INFO );
|
aReporter.ReportTail( _( "Finished" ), RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( m_settings.write_erc_file )
|
if( m_settings.write_erc_file )
|
||||||
{
|
{
|
||||||
|
|
|
@ -331,7 +331,7 @@ wxFileName DIALOG_PLOT_SCHEMATIC::createPlotFileName( wxTextCtrl* aOutputDirecto
|
||||||
{
|
{
|
||||||
wxString msg = wxString::Format( _( "Could not write plot files to folder \"%s\"." ),
|
wxString msg = wxString::Format( _( "Could not write plot files to folder \"%s\"." ),
|
||||||
outputDir.GetPath() );
|
outputDir.GetPath() );
|
||||||
aReporter->Report( msg, SEVERITY_ERROR );
|
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileName fn( plotFileName );
|
wxFileName fn( plotFileName );
|
||||||
|
|
|
@ -203,7 +203,7 @@ void DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable( REPORTER& aReporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Adding library \"%s\", file \"%s\" to project symbol library table." ),
|
msg.Printf( _( "Adding library \"%s\", file \"%s\" to project symbol library table." ),
|
||||||
libName, fullFileName );
|
libName, fullFileName );
|
||||||
aReporter.Report( msg, SEVERITY_INFO );
|
aReporter.Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
prjLibTable.InsertRow( new SYMBOL_LIB_TABLE_ROW( libName, fullFileName,
|
prjLibTable.InsertRow( new SYMBOL_LIB_TABLE_ROW( libName, fullFileName,
|
||||||
pluginType ) );
|
pluginType ) );
|
||||||
|
@ -211,7 +211,7 @@ void DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable( REPORTER& aReporter )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Library \"%s\" not found." ), fullFileName );
|
msg.Printf( _( "Library \"%s\" not found." ), fullFileName );
|
||||||
aReporter.Report( msg, SEVERITY_WARNING );
|
aReporter.Report( msg, RPT_SEVERITY_WARNING );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,10 +229,10 @@ void DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable( REPORTER& aReporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Failed to write project symbol library table. Error:\n %s" ),
|
msg.Printf( _( "Failed to write project symbol library table. Error:\n %s" ),
|
||||||
ioe.What() );
|
ioe.What() );
|
||||||
aReporter.ReportTail( msg, SEVERITY_ERROR );
|
aReporter.ReportTail( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
aReporter.ReportTail( _( "Created project symbol library table.\n" ), SEVERITY_INFO );
|
aReporter.ReportTail( _( "Created project symbol library table.\n" ), RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -255,20 +255,20 @@ void DIALOG_SYMBOL_REMAP::remapSymbolsToLibTable( REPORTER& aReporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "No symbol \"%s\" found in symbol library table." ),
|
msg.Printf( _( "No symbol \"%s\" found in symbol library table." ),
|
||||||
symbol->GetLibId().GetLibItemName().wx_str() );
|
symbol->GetLibId().GetLibItemName().wx_str() );
|
||||||
aReporter.Report( msg, SEVERITY_WARNING );
|
aReporter.Report( msg, RPT_SEVERITY_WARNING );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Symbol \"%s\" mapped to symbol library \"%s\"." ),
|
msg.Printf( _( "Symbol \"%s\" mapped to symbol library \"%s\"." ),
|
||||||
symbol->GetLibId().GetLibItemName().wx_str(),
|
symbol->GetLibId().GetLibItemName().wx_str(),
|
||||||
symbol->GetLibId().GetLibNickname().wx_str() );
|
symbol->GetLibId().GetLibNickname().wx_str() );
|
||||||
aReporter.Report( msg,SEVERITY_ACTION );
|
aReporter.Report( msg, RPT_SEVERITY_ACTION );
|
||||||
screen->SetModify();
|
screen->SetModify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aReporter.Report( _( "Symbol library table mapping complete!" ), SEVERITY_INFO );
|
aReporter.Report( _( "Symbol library table mapping complete!" ), RPT_SEVERITY_INFO );
|
||||||
schematic.UpdateSymbolLinks( true );
|
schematic.UpdateSymbolLinks( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ bool DIALOG_SYMBOL_REMAP::backupProject( REPORTER& aReporter )
|
||||||
|
|
||||||
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
||||||
srcFileName.GetFullPath(), destFileName.GetFullPath() );
|
srcFileName.GetFullPath(), destFileName.GetFullPath() );
|
||||||
aReporter.Report( tmp, SEVERITY_INFO );
|
aReporter.Report( tmp, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( wxFileName::Exists( srcFileName.GetFullPath() )
|
if( wxFileName::Exists( srcFileName.GetFullPath() )
|
||||||
&& !wxCopyFile( srcFileName.GetFullPath(), destFileName.GetFullPath() ) )
|
&& !wxCopyFile( srcFileName.GetFullPath(), destFileName.GetFullPath() ) )
|
||||||
|
@ -396,7 +396,7 @@ bool DIALOG_SYMBOL_REMAP::backupProject( REPORTER& aReporter )
|
||||||
|
|
||||||
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
||||||
screen->GetFileName(), destFileName.GetFullPath() );
|
screen->GetFileName(), destFileName.GetFullPath() );
|
||||||
aReporter.Report( tmp, SEVERITY_INFO );
|
aReporter.Report( tmp, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( !destFileName.DirExists() && !destFileName.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) )
|
if( !destFileName.DirExists() && !destFileName.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) )
|
||||||
{
|
{
|
||||||
|
@ -420,7 +420,7 @@ bool DIALOG_SYMBOL_REMAP::backupProject( REPORTER& aReporter )
|
||||||
|
|
||||||
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
||||||
Prj().GetProjectFullName(), destFileName.GetFullPath() );
|
Prj().GetProjectFullName(), destFileName.GetFullPath() );
|
||||||
aReporter.Report( tmp, SEVERITY_INFO );
|
aReporter.Report( tmp, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( wxFileName::Exists( Prj().GetProjectFullName() )
|
if( wxFileName::Exists( Prj().GetProjectFullName() )
|
||||||
&& !wxCopyFile( Prj().GetProjectFullName(), destFileName.GetFullPath() ) )
|
&& !wxCopyFile( Prj().GetProjectFullName(), destFileName.GetFullPath() ) )
|
||||||
|
@ -440,7 +440,7 @@ bool DIALOG_SYMBOL_REMAP::backupProject( REPORTER& aReporter )
|
||||||
|
|
||||||
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
||||||
srcFileName.GetFullPath(), destFileName.GetFullPath() );
|
srcFileName.GetFullPath(), destFileName.GetFullPath() );
|
||||||
aReporter.Report( tmp, SEVERITY_INFO );
|
aReporter.Report( tmp, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( srcFileName.Exists()
|
if( srcFileName.Exists()
|
||||||
&& !wxCopyFile( srcFileName.GetFullPath(), destFileName.GetFullPath() ) )
|
&& !wxCopyFile( srcFileName.GetFullPath(), destFileName.GetFullPath() ) )
|
||||||
|
@ -456,7 +456,7 @@ bool DIALOG_SYMBOL_REMAP::backupProject( REPORTER& aReporter )
|
||||||
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
||||||
srcFileName.GetFullPath(),
|
srcFileName.GetFullPath(),
|
||||||
destFileName.GetFullPath() );
|
destFileName.GetFullPath() );
|
||||||
aReporter.Report( tmp, SEVERITY_INFO );
|
aReporter.Report( tmp, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( srcFileName.Exists()
|
if( srcFileName.Exists()
|
||||||
&& !wxCopyFile( srcFileName.GetFullPath(), destFileName.GetFullPath() ) )
|
&& !wxCopyFile( srcFileName.GetFullPath(), destFileName.GetFullPath() ) )
|
||||||
|
@ -472,7 +472,7 @@ bool DIALOG_SYMBOL_REMAP::backupProject( REPORTER& aReporter )
|
||||||
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
tmp.Printf( _( "Backing up file \"%s\" to file \"%s\"." ),
|
||||||
srcFileName.GetFullPath(),
|
srcFileName.GetFullPath(),
|
||||||
destFileName.GetFullPath() );
|
destFileName.GetFullPath() );
|
||||||
aReporter.Report( tmp, SEVERITY_INFO );
|
aReporter.Report( tmp, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( srcFileName.Exists()
|
if( srcFileName.Exists()
|
||||||
&& !wxCopyFile( srcFileName.GetFullPath(), destFileName.GetFullPath() ) )
|
&& !wxCopyFile( srcFileName.GetFullPath(), destFileName.GetFullPath() ) )
|
||||||
|
|
|
@ -119,33 +119,33 @@ bool SCH_EDIT_FRAME::WriteNetListFile( NETLIST_OBJECT_LIST* aConnectedItemsList,
|
||||||
|
|
||||||
msg << _( "Run command:" ) << wxT( "\n" ) << commandLine << wxT( "\n\n" );
|
msg << _( "Run command:" ) << wxT( "\n" ) << commandLine << wxT( "\n\n" );
|
||||||
|
|
||||||
aReporter->ReportHead( msg, SEVERITY_ACTION );
|
aReporter->ReportHead( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
if( diag != 0 )
|
if( diag != 0 )
|
||||||
aReporter->ReportTail( wxString::Format(
|
aReporter->ReportTail( wxString::Format(
|
||||||
_("Command error. Return code %d" ), diag ),
|
_("Command error. Return code %d" ), diag ),
|
||||||
SEVERITY_ERROR );
|
RPT_SEVERITY_ERROR );
|
||||||
else
|
else
|
||||||
aReporter->ReportTail( _( "Success" ), SEVERITY_INFO );
|
aReporter->ReportTail( _( "Success" ), RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( output.GetCount() )
|
if( output.GetCount() )
|
||||||
{
|
{
|
||||||
msg.Empty();
|
msg.Empty();
|
||||||
msg << wxT( "\n" ) << _( "Info messages:" ) << wxT( "\n" );
|
msg << wxT( "\n" ) << _( "Info messages:" ) << wxT( "\n" );
|
||||||
aReporter->Report( msg, SEVERITY_INFO );
|
aReporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < output.GetCount(); ii++ )
|
for( unsigned ii = 0; ii < output.GetCount(); ii++ )
|
||||||
aReporter->Report( output[ii] + wxT( "\n" ), SEVERITY_INFO );
|
aReporter->Report( output[ii] + wxT( "\n" ), RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( errors.GetCount() )
|
if( errors.GetCount() )
|
||||||
{
|
{
|
||||||
msg.Empty();
|
msg.Empty();
|
||||||
msg << wxT("\n") << _( "Error messages:" ) << wxT( "\n" );
|
msg << wxT("\n") << _( "Error messages:" ) << wxT( "\n" );
|
||||||
aReporter->Report( msg, SEVERITY_INFO );
|
aReporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < errors.GetCount(); ii++ )
|
for( unsigned ii = 0; ii < errors.GetCount(); ii++ )
|
||||||
aReporter->Report( errors[ii] + wxT( "\n" ), SEVERITY_ERROR );
|
aReporter->Report( errors[ii] + wxT( "\n" ), RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -77,18 +77,18 @@ void DIALOG_PLOT_SCHEMATIC::CreateDXFFile( bool aPlotAll, bool aPlotFrameRef )
|
||||||
aPlotFrameRef ) )
|
aPlotFrameRef ) )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
|
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ACTION );
|
reporter.Report( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
else // Error
|
else // Error
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
|
msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( IO_ERROR& e )
|
catch( IO_ERROR& e )
|
||||||
{
|
{
|
||||||
msg.Printf( wxT( "DXF Plotter exception: %s"), e.What() );
|
msg.Printf( wxT( "DXF Plotter exception: %s"), e.What() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
schframe->SetCurrentSheet( oldsheetpath );
|
schframe->SetCurrentSheet( oldsheetpath );
|
||||||
schframe->GetCurrentSheet().UpdateAllScreenReferences();
|
schframe->GetCurrentSheet().UpdateAllScreenReferences();
|
||||||
schframe->SetSheetNumberAndCount();
|
schframe->SetSheetNumberAndCount();
|
||||||
|
|
|
@ -149,18 +149,18 @@ void DIALOG_PLOT_SCHEMATIC::createHPGLFile( bool aPlotAll, bool aPlotFrameRef )
|
||||||
plot_scale, aPlotFrameRef ) )
|
plot_scale, aPlotFrameRef ) )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
|
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ACTION );
|
reporter.Report( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
|
msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( IO_ERROR& e )
|
catch( IO_ERROR& e )
|
||||||
{
|
{
|
||||||
msg.Printf( wxT( "HPGL Plotter exception: %s"), e.What() );
|
msg.Printf( wxT( "HPGL Plotter exception: %s"), e.What() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
|
||||||
if( !plotter->OpenFile( plotFileName.GetFullPath() ) )
|
if( !plotter->OpenFile( plotFileName.GetFullPath() ) )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
|
msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
delete plotter;
|
delete plotter;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
|
||||||
{
|
{
|
||||||
// Cannot plot PDF file
|
// Cannot plot PDF file
|
||||||
msg.Printf( wxT( "PDF Plotter exception: %s" ), e.What() );
|
msg.Printf( wxT( "PDF Plotter exception: %s" ), e.What() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
restoreEnvironment( plotter, oldsheetpath );
|
restoreEnvironment( plotter, oldsheetpath );
|
||||||
return;
|
return;
|
||||||
|
@ -122,7 +122,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
|
||||||
|
|
||||||
// Everything done, close the plot and restore the environment
|
// Everything done, close the plot and restore the environment
|
||||||
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
|
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ACTION );
|
reporter.Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
restoreEnvironment( plotter, oldsheetpath );
|
restoreEnvironment( plotter, oldsheetpath );
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,20 +104,20 @@ void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef )
|
||||||
scale, aPlotFrameRef ) )
|
scale, aPlotFrameRef ) )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
|
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ACTION );
|
reporter.Report( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Error
|
// Error
|
||||||
msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
|
msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch( IO_ERROR& e )
|
catch( IO_ERROR& e )
|
||||||
{
|
{
|
||||||
msg.Printf( wxT( "PS Plotter exception: %s"), e.What() );
|
msg.Printf( wxT( "PS Plotter exception: %s"), e.What() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,19 +74,19 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
|
||||||
if( !success )
|
if( !success )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Cannot create file \"%s\".\n" ), plotFileName.GetFullPath() );
|
msg.Printf( _( "Cannot create file \"%s\".\n" ), plotFileName.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
|
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ACTION );
|
reporter.Report( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( const IO_ERROR& e )
|
catch( const IO_ERROR& e )
|
||||||
{
|
{
|
||||||
// Cannot plot SVG file
|
// Cannot plot SVG file
|
||||||
msg.Printf( wxT( "SVG Plotter exception: %s" ), e.What() );
|
msg.Printf( wxT( "SVG Plotter exception: %s" ), e.What() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED ) override
|
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) override
|
||||||
{
|
{
|
||||||
wxCommandEvent* event = new wxCommandEvent( EVT_SIM_REPORT );
|
wxCommandEvent* event = new wxCommandEvent( EVT_SIM_REPORT );
|
||||||
event->SetString( aText );
|
event->SetString( aText );
|
||||||
|
|
|
@ -61,7 +61,7 @@ bool BACK_ANNOTATE::BackAnnotateSymbols( const std::string& aNetlist )
|
||||||
&& !m_settings.processReferences )
|
&& !m_settings.processReferences )
|
||||||
{
|
{
|
||||||
m_settings.reporter.ReportTail(
|
m_settings.reporter.ReportTail(
|
||||||
_( "Select at least one property to back annotate" ), SEVERITY_ERROR );
|
_( "Select at least one property to back annotate" ), RPT_SEVERITY_ERROR );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,16 +85,16 @@ bool BACK_ANNOTATE::BackAnnotateSymbols( const std::string& aNetlist )
|
||||||
if( !m_settings.dryRun )
|
if( !m_settings.dryRun )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Schematic is back-annotated. %d changes applied." ), m_changesCount );
|
msg.Printf( _( "Schematic is back-annotated. %d changes applied." ), m_changesCount );
|
||||||
m_settings.reporter.ReportTail( msg, SEVERITY_ACTION );
|
m_settings.reporter.ReportTail( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_settings.reporter.ReportTail(
|
m_settings.reporter.ReportTail(
|
||||||
_( "No errors during dry run. Ready to go." ), SEVERITY_ACTION );
|
_( "No errors during dry run. Ready to go." ), RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Found %d errors. Fix them and run back annotation." ), errors );
|
msg.Printf( _( "Found %d errors. Fix them and run back annotation." ), errors );
|
||||||
m_settings.reporter.ReportTail( msg, SEVERITY_ERROR );
|
m_settings.reporter.ReportTail( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
return !errors;
|
return !errors;
|
||||||
|
@ -149,7 +149,7 @@ int BACK_ANNOTATE::getPcbModulesFromString( const std::string& aPayload )
|
||||||
if( path == "" )
|
if( path == "" )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Footprint \"%s\" has no symbol associated." ), ref );
|
msg.Printf( _( "Footprint \"%s\" has no symbol associated." ), ref );
|
||||||
m_settings.reporter.ReportHead( msg, SEVERITY_WARNING );
|
m_settings.reporter.ReportHead( msg, RPT_SEVERITY_WARNING );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
footprint = UTF8( item.second.get_child( "fpid" ).front().first );
|
footprint = UTF8( item.second.get_child( "fpid" ).front().first );
|
||||||
|
@ -168,7 +168,7 @@ int BACK_ANNOTATE::getPcbModulesFromString( const std::string& aPayload )
|
||||||
// Module with this path already exists - generate error
|
// Module with this path already exists - generate error
|
||||||
msg.Printf( _( "Pcb footprints \"%s\" and \"%s\" linked to same symbol" ),
|
msg.Printf( _( "Pcb footprints \"%s\" and \"%s\" linked to same symbol" ),
|
||||||
nearestItem->second->ref, ref );
|
nearestItem->second->ref, ref );
|
||||||
m_settings.reporter.ReportHead( msg, SEVERITY_ERROR );
|
m_settings.reporter.ReportHead( msg, RPT_SEVERITY_ERROR );
|
||||||
++errors;
|
++errors;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -223,7 +223,7 @@ int BACK_ANNOTATE::getChangeList()
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "Cannot find symbol for \"%s\" footprint" ), pcbData->ref );
|
msg.Printf( _( "Cannot find symbol for \"%s\" footprint" ), pcbData->ref );
|
||||||
++errors;
|
++errors;
|
||||||
m_settings.reporter.ReportTail( msg, SEVERITY_ERROR );
|
m_settings.reporter.ReportTail( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return errors;
|
return errors;
|
||||||
|
@ -248,7 +248,7 @@ int BACK_ANNOTATE::checkForUnusedSymbols()
|
||||||
++errors;
|
++errors;
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "Cannot find footprint for \"%s\" symbol" ), m_refs[i++].GetFullRef() );
|
msg.Printf( _( "Cannot find footprint for \"%s\" symbol" ), m_refs[i++].GetFullRef() );
|
||||||
m_settings.reporter.ReportTail( msg, SEVERITY_ERROR );
|
m_settings.reporter.ReportTail( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
|
@ -310,7 +310,7 @@ int BACK_ANNOTATE::checkSharedSchematicErrors()
|
||||||
msg.Printf( _( "\"%s\" and \"%s\" use the same schematic symbol.\n"
|
msg.Printf( _( "\"%s\" and \"%s\" use the same schematic symbol.\n"
|
||||||
"They cannot have different footprints or values." ),
|
"They cannot have different footprints or values." ),
|
||||||
( it + 1 )->second->ref, it->second->ref );
|
( it + 1 )->second->ref, it->second->ref );
|
||||||
m_settings.reporter.ReportTail( msg, SEVERITY_ERROR );
|
m_settings.reporter.ReportTail( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -328,7 +328,7 @@ int BACK_ANNOTATE::checkSharedSchematicErrors()
|
||||||
msg.Printf( _( "Unable to change \"%s\" footprint or value because associated"
|
msg.Printf( _( "Unable to change \"%s\" footprint or value because associated"
|
||||||
" symbol is reused in the another project" ),
|
" symbol is reused in the another project" ),
|
||||||
it->second->ref );
|
it->second->ref );
|
||||||
m_settings.reporter.ReportTail( msg, SEVERITY_ERROR );
|
m_settings.reporter.ReportTail( msg, RPT_SEVERITY_ERROR );
|
||||||
++errors;
|
++errors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -359,7 +359,7 @@ void BACK_ANNOTATE::applyChangelist()
|
||||||
msg.Printf( _( "Change \"%s\" reference to \"%s\"." ), ref.GetFullRef(), module.ref );
|
msg.Printf( _( "Change \"%s\" reference to \"%s\"." ), ref.GetFullRef(), module.ref );
|
||||||
if( !m_settings.dryRun )
|
if( !m_settings.dryRun )
|
||||||
ref.GetComp()->SetRef( &ref.GetSheetPath(), module.ref );
|
ref.GetComp()->SetRef( &ref.GetSheetPath(), module.ref );
|
||||||
m_settings.reporter.ReportHead( msg, SEVERITY_ACTION );
|
m_settings.reporter.ReportHead( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_settings.processFootprints && oldFootprint != module.footprint )
|
if( m_settings.processFootprints && oldFootprint != module.footprint )
|
||||||
|
@ -370,7 +370,7 @@ void BACK_ANNOTATE::applyChangelist()
|
||||||
|
|
||||||
if( !m_settings.dryRun )
|
if( !m_settings.dryRun )
|
||||||
ref.GetComp()->GetField( FOOTPRINT )->SetText( module.footprint );
|
ref.GetComp()->GetField( FOOTPRINT )->SetText( module.footprint );
|
||||||
m_settings.reporter.ReportHead( msg, SEVERITY_ACTION );
|
m_settings.reporter.ReportHead( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_settings.processValues && oldValue != module.value )
|
if( m_settings.processValues && oldValue != module.value )
|
||||||
|
@ -380,12 +380,12 @@ void BACK_ANNOTATE::applyChangelist()
|
||||||
getTextFromField( ref, VALUE ), module.value );
|
getTextFromField( ref, VALUE ), module.value );
|
||||||
if( !m_settings.dryRun )
|
if( !m_settings.dryRun )
|
||||||
item.first.GetComp()->GetField( VALUE )->SetText( module.value );
|
item.first.GetComp()->GetField( VALUE )->SetText( module.value );
|
||||||
m_settings.reporter.ReportHead( msg, SEVERITY_ACTION );
|
m_settings.reporter.ReportHead( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( changesCountBefore == m_changesCount )
|
if( changesCountBefore == m_changesCount )
|
||||||
++leftUnchanged;
|
++leftUnchanged;
|
||||||
}
|
}
|
||||||
msg.Printf( _( "%d symbols left unchanged" ), leftUnchanged );
|
msg.Printf( _( "%d symbols left unchanged" ), leftUnchanged );
|
||||||
m_settings.reporter.ReportHead( msg, SEVERITY_INFO );
|
m_settings.reporter.ReportHead( msg, RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
|
|
|
@ -308,7 +308,7 @@ bool GERBVIEW_FRAME::loadListOfGerberAndDrillFiles( const wxString& aPath,
|
||||||
wxString warning;
|
wxString warning;
|
||||||
warning << "<b>" << _( "File not found:" ) << "</b><br>"
|
warning << "<b>" << _( "File not found:" ) << "</b><br>"
|
||||||
<< filename.GetFullPath() << "<br>";
|
<< filename.GetFullPath() << "<br>";
|
||||||
reporter.Report( warning, SEVERITY_WARNING );
|
reporter.Report( warning, RPT_SEVERITY_WARNING );
|
||||||
success = false;
|
success = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -350,7 +350,7 @@ bool GERBVIEW_FRAME::loadListOfGerberAndDrillFiles( const wxString& aPath,
|
||||||
if( layer == NO_AVAILABLE_LAYERS && ii < aFilenameList.GetCount()-1 )
|
if( layer == NO_AVAILABLE_LAYERS && ii < aFilenameList.GetCount()-1 )
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
reporter.Report( MSG_NO_MORE_LAYER, SEVERITY_ERROR );
|
reporter.Report( MSG_NO_MORE_LAYER, RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
// Report the name of not loaded files:
|
// Report the name of not loaded files:
|
||||||
ii += 1;
|
ii += 1;
|
||||||
|
@ -358,7 +358,7 @@ bool GERBVIEW_FRAME::loadListOfGerberAndDrillFiles( const wxString& aPath,
|
||||||
{
|
{
|
||||||
filename = aFilenameList[ii++];
|
filename = aFilenameList[ii++];
|
||||||
wxString txt = wxString::Format( MSG_NOT_LOADED, filename.GetFullName() );
|
wxString txt = wxString::Format( MSG_NOT_LOADED, filename.GetFullName() );
|
||||||
reporter.Report( txt, SEVERITY_ERROR );
|
reporter.Report( txt, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -471,7 +471,7 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName )
|
||||||
if( layer == NO_AVAILABLE_LAYERS && ii < filenamesList.GetCount()-1 )
|
if( layer == NO_AVAILABLE_LAYERS && ii < filenamesList.GetCount()-1 )
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
reporter.Report( MSG_NO_MORE_LAYER, SEVERITY_ERROR );
|
reporter.Report( MSG_NO_MORE_LAYER, RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
// Report the name of not loaded files:
|
// Report the name of not loaded files:
|
||||||
ii += 1;
|
ii += 1;
|
||||||
|
@ -479,7 +479,7 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName )
|
||||||
{
|
{
|
||||||
filename = filenamesList[ii++];
|
filename = filenamesList[ii++];
|
||||||
wxString txt = wxString::Format( MSG_NOT_LOADED, filename.GetFullName() );
|
wxString txt = wxString::Format( MSG_NOT_LOADED, filename.GetFullName() );
|
||||||
reporter.Report( txt, SEVERITY_ERROR );
|
reporter.Report( txt, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -522,7 +522,7 @@ bool GERBVIEW_FRAME::unarchiveFiles( const wxString& aFullFileName, REPORTER* aR
|
||||||
if( aReporter )
|
if( aReporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Zip file \"%s\" cannot be opened" ), aFullFileName );
|
msg.Printf( _( "Zip file \"%s\" cannot be opened" ), aFullFileName );
|
||||||
aReporter->Report( msg, SEVERITY_ERROR );
|
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -564,7 +564,7 @@ bool GERBVIEW_FRAME::unarchiveFiles( const wxString& aFullFileName, REPORTER* aR
|
||||||
if( aReporter )
|
if( aReporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Info: skip file \"%s\" (unknown type)\n" ), entry->GetName() );
|
msg.Printf( _( "Info: skip file \"%s\" (unknown type)\n" ), entry->GetName() );
|
||||||
aReporter->Report( msg, SEVERITY_WARNING );
|
aReporter->Report( msg, RPT_SEVERITY_WARNING );
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
@ -579,13 +579,13 @@ bool GERBVIEW_FRAME::unarchiveFiles( const wxString& aFullFileName, REPORTER* aR
|
||||||
if( aReporter )
|
if( aReporter )
|
||||||
{
|
{
|
||||||
if( !reported_no_more_layer )
|
if( !reported_no_more_layer )
|
||||||
aReporter->Report( MSG_NO_MORE_LAYER, SEVERITY_ERROR );
|
aReporter->Report( MSG_NO_MORE_LAYER, RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
reported_no_more_layer = true;
|
reported_no_more_layer = true;
|
||||||
|
|
||||||
// Report the name of not loaded files:
|
// Report the name of not loaded files:
|
||||||
msg.Printf( MSG_NOT_LOADED, GetChars( entry->GetName() ) );
|
msg.Printf( MSG_NOT_LOADED, GetChars( entry->GetName() ) );
|
||||||
aReporter->Report( msg, SEVERITY_ERROR );
|
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
delete entry;
|
delete entry;
|
||||||
|
@ -606,7 +606,7 @@ bool GERBVIEW_FRAME::unarchiveFiles( const wxString& aFullFileName, REPORTER* aR
|
||||||
{
|
{
|
||||||
msg.Printf( _( "<b>Unable to create temporary file \"%s\"</b>\n"),
|
msg.Printf( _( "<b>Unable to create temporary file \"%s\"</b>\n"),
|
||||||
unzipped_tempfile );
|
unzipped_tempfile );
|
||||||
aReporter->Report( msg, SEVERITY_ERROR );
|
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -635,7 +635,7 @@ bool GERBVIEW_FRAME::unarchiveFiles( const wxString& aFullFileName, REPORTER* aR
|
||||||
if( aReporter )
|
if( aReporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _("<b>unzipped file %s read error</b>\n"), unzipped_tempfile );
|
msg.Printf( _("<b>unzipped file %s read error</b>\n"), unzipped_tempfile );
|
||||||
aReporter->Report( msg, SEVERITY_ERROR );
|
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -152,7 +152,7 @@ bool GERBER_JOBFILE_READER::ReadGerberJobFile()
|
||||||
{
|
{
|
||||||
if( m_reporter )
|
if( m_reporter )
|
||||||
m_reporter->ReportTail( _( "This job file uses an outdated format. Please recreate it." ),
|
m_reporter->ReportTail( _( "This job file uses an outdated format. Please recreate it." ),
|
||||||
SEVERITY_WARNING );
|
RPT_SEVERITY_WARNING );
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,13 +83,13 @@ public:
|
||||||
* RPT_ERROR, RPT_ACTION ) used to filter and format messages
|
* RPT_ERROR, RPT_ACTION ) used to filter and format messages
|
||||||
*/
|
*/
|
||||||
|
|
||||||
virtual REPORTER& Report( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED ) = 0;
|
virtual REPORTER& Report( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function ReportTail
|
* Function ReportTail
|
||||||
* Places the report at the end of the list, for objects that support report ordering
|
* Places the report at the end of the list, for objects that support report ordering
|
||||||
*/
|
*/
|
||||||
virtual REPORTER& ReportTail( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED )
|
virtual REPORTER& ReportTail( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED )
|
||||||
{
|
{
|
||||||
return Report( aText, aSeverity );
|
return Report( aText, aSeverity );
|
||||||
}
|
}
|
||||||
|
@ -98,12 +98,12 @@ public:
|
||||||
* Function ReportHead
|
* Function ReportHead
|
||||||
* Places the report at the beginning of the list for objects that support ordering
|
* Places the report at the beginning of the list for objects that support ordering
|
||||||
*/
|
*/
|
||||||
virtual REPORTER& ReportHead( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED )
|
virtual REPORTER& ReportHead( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED )
|
||||||
{
|
{
|
||||||
return Report( aText, aSeverity );
|
return Report( aText, aSeverity );
|
||||||
}
|
}
|
||||||
|
|
||||||
REPORTER& Report( const char* aText, SEVERITY aSeverity = SEVERITY_UNDEFINED );
|
REPORTER& Report( const char* aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED );
|
||||||
|
|
||||||
REPORTER& operator <<( const wxString& aText ) { return Report( aText ); }
|
REPORTER& operator <<( const wxString& aText ) { return Report( aText ); }
|
||||||
REPORTER& operator <<( const wxChar* aText ) { return Report( wxString( aText ) ); }
|
REPORTER& operator <<( const wxChar* aText ) { return Report( wxString( aText ) ); }
|
||||||
|
@ -141,7 +141,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED ) override;
|
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) override;
|
||||||
|
|
||||||
bool HasMessage() const override;
|
bool HasMessage() const override;
|
||||||
};
|
};
|
||||||
|
@ -166,7 +166,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED ) override;
|
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) override;
|
||||||
|
|
||||||
bool HasMessage() const override;
|
bool HasMessage() const override;
|
||||||
};
|
};
|
||||||
|
@ -191,11 +191,11 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED ) override;
|
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) override;
|
||||||
|
|
||||||
REPORTER& ReportTail( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED ) override;
|
REPORTER& ReportTail( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) override;
|
||||||
|
|
||||||
REPORTER& ReportHead( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED ) override;
|
REPORTER& ReportHead( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) override;
|
||||||
|
|
||||||
bool HasMessage() const override;
|
bool HasMessage() const override;
|
||||||
};
|
};
|
||||||
|
@ -219,7 +219,7 @@ public:
|
||||||
|
|
||||||
static REPORTER& GetInstance();
|
static REPORTER& GetInstance();
|
||||||
|
|
||||||
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED ) override;
|
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) override;
|
||||||
|
|
||||||
bool HasMessage() const override { return false; }
|
bool HasMessage() const override { return false; }
|
||||||
};
|
};
|
||||||
|
@ -242,7 +242,7 @@ public:
|
||||||
|
|
||||||
static REPORTER& GetInstance();
|
static REPORTER& GetInstance();
|
||||||
|
|
||||||
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = SEVERITY_UNDEFINED ) override;
|
REPORTER& Report( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) override;
|
||||||
|
|
||||||
bool HasMessage() const override { return false; }
|
bool HasMessage() const override { return false; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,15 +40,16 @@ int GetStdMargin();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: On windows, SEVERITY_ERROR collides with a system declaration,
|
||||||
|
// so we used RPT_SEVERITY _xxx instead of SEVERITY _xxx
|
||||||
enum SEVERITY {
|
enum SEVERITY {
|
||||||
SEVERITY_UNDEFINED = 0x00,
|
RPT_SEVERITY_UNDEFINED = 0x00,
|
||||||
SEVERITY_INFO = 0x01,
|
RPT_SEVERITY_INFO = 0x01,
|
||||||
SEVERITY_EXCLUSION = 0x02,
|
RPT_SEVERITY_EXCLUSION = 0x02,
|
||||||
SEVERITY_ACTION = 0x04,
|
RPT_SEVERITY_ACTION = 0x04,
|
||||||
SEVERITY_WARNING = 0x08,
|
RPT_SEVERITY_WARNING = 0x08,
|
||||||
SEVERITY_ERROR = 0x10,
|
RPT_SEVERITY_ERROR = 0x10,
|
||||||
SEVERITY_IGNORE = 0x20
|
RPT_SEVERITY_IGNORE = 0x20
|
||||||
};
|
};
|
||||||
|
|
||||||
wxBitmap MakeBadge( SEVERITY aStyle, int aCount, wxWindow* aWindow, int aDepth = 1 );
|
wxBitmap MakeBadge( SEVERITY aStyle, int aCount, wxWindow* aWindow, int aDepth = 1 );
|
||||||
|
|
|
@ -84,17 +84,17 @@ public:
|
||||||
if( aConfig->Read( wxT( "RequireCourtyardDefinitions" ), &flag, false ) )
|
if( aConfig->Read( wxT( "RequireCourtyardDefinitions" ), &flag, false ) )
|
||||||
{
|
{
|
||||||
if( flag )
|
if( flag )
|
||||||
bds.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = SEVERITY_ERROR;
|
bds.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = RPT_SEVERITY_ERROR;
|
||||||
else
|
else
|
||||||
bds.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = SEVERITY_IGNORE;
|
bds.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = RPT_SEVERITY_IGNORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aConfig->Read( wxT( "ProhibitOverlappingCourtyards" ), &flag, false ) )
|
if( aConfig->Read( wxT( "ProhibitOverlappingCourtyards" ), &flag, false ) )
|
||||||
{
|
{
|
||||||
if( flag )
|
if( flag )
|
||||||
bds.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = SEVERITY_ERROR;
|
bds.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = RPT_SEVERITY_ERROR;
|
||||||
else
|
else
|
||||||
bds.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = SEVERITY_IGNORE;
|
bds.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = RPT_SEVERITY_IGNORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TO DO: figure out what we're going to use as keys here so we can read/write these....
|
// TO DO: figure out what we're going to use as keys here so we can read/write these....
|
||||||
|
@ -116,9 +116,9 @@ public:
|
||||||
// TO DO: for now just write out the legacy ones so we don't lose them
|
// TO DO: for now just write out the legacy ones so we don't lose them
|
||||||
// TO DO: remove this once the new scheme is in place
|
// TO DO: remove this once the new scheme is in place
|
||||||
aConfig->Write( wxT( "RequireCourtyardDefinitions" ),
|
aConfig->Write( wxT( "RequireCourtyardDefinitions" ),
|
||||||
bds.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] != SEVERITY_IGNORE );
|
bds.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] != RPT_SEVERITY_IGNORE );
|
||||||
aConfig->Write( wxT( "ProhibitOverlappingCourtyards" ),
|
aConfig->Write( wxT( "ProhibitOverlappingCourtyards" ),
|
||||||
bds.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] != SEVERITY_IGNORE );
|
bds.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] != RPT_SEVERITY_IGNORE );
|
||||||
|
|
||||||
aConfig->SetPath( oldPath );
|
aConfig->SetPath( oldPath );
|
||||||
}
|
}
|
||||||
|
@ -571,9 +571,9 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
|
||||||
m_HoleToHoleMin = Millimeter2iu( DEFAULT_HOLETOHOLEMIN );
|
m_HoleToHoleMin = Millimeter2iu( DEFAULT_HOLETOHOLEMIN );
|
||||||
|
|
||||||
for( int errorCode = DRCE_FIRST; errorCode <= DRCE_LAST; ++errorCode )
|
for( int errorCode = DRCE_FIRST; errorCode <= DRCE_LAST; ++errorCode )
|
||||||
m_DRCSeverities[ errorCode ] = SEVERITY_ERROR;
|
m_DRCSeverities[ errorCode ] = RPT_SEVERITY_ERROR;
|
||||||
|
|
||||||
m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = SEVERITY_IGNORE;
|
m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = RPT_SEVERITY_IGNORE;
|
||||||
|
|
||||||
m_MaxError = ARC_HIGH_DEF;
|
m_MaxError = ARC_HIGH_DEF;
|
||||||
m_ZoneUseNoOutlineInFill = false; // Use compatibility mode by default
|
m_ZoneUseNoOutlineInFill = false; // Use compatibility mode by default
|
||||||
|
@ -781,7 +781,7 @@ int BOARD_DESIGN_SETTINGS::GetSeverity( int aDRCErrorCode )
|
||||||
|
|
||||||
bool BOARD_DESIGN_SETTINGS::Ignore( int aDRCErrorCode )
|
bool BOARD_DESIGN_SETTINGS::Ignore( int aDRCErrorCode )
|
||||||
{
|
{
|
||||||
return m_DRCSeverities[ aDRCErrorCode ] == SEVERITY_IGNORE;
|
return m_DRCSeverities[ aDRCErrorCode ] == RPT_SEVERITY_IGNORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -186,8 +186,8 @@ void MARKER_PCB::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||||
switch( board->GetDesignSettings().GetSeverity( m_drc.GetErrorCode() ) )
|
switch( board->GetDesignSettings().GetSeverity( m_drc.GetErrorCode() ) )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case SEVERITY::SEVERITY_ERROR: aLayers[0] = LAYER_DRC_ERROR; break;
|
case SEVERITY::RPT_SEVERITY_ERROR: aLayers[0] = LAYER_DRC_ERROR; break;
|
||||||
case SEVERITY::SEVERITY_WARNING: aLayers[0] = LAYER_DRC_WARNING; break;
|
case SEVERITY::RPT_SEVERITY_WARNING: aLayers[0] = LAYER_DRC_WARNING; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,8 +207,8 @@ GAL_LAYER_ID MARKER_PCB::GetColorLayer() const
|
||||||
switch( board->GetDesignSettings().GetSeverity( m_drc.GetErrorCode() ) )
|
switch( board->GetDesignSettings().GetSeverity( m_drc.GetErrorCode() ) )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case SEVERITY::SEVERITY_ERROR: return LAYER_DRC_ERROR;
|
case SEVERITY::RPT_SEVERITY_ERROR: return LAYER_DRC_ERROR;
|
||||||
case SEVERITY::SEVERITY_WARNING: return LAYER_DRC_WARNING;
|
case SEVERITY::RPT_SEVERITY_WARNING: return LAYER_DRC_WARNING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#define KICAD_DIALOG_BOARD_SETUP_H
|
#define KICAD_DIALOG_BOARD_SETUP_H
|
||||||
|
|
||||||
#include <widgets/paged_dialog.h>
|
#include <widgets/paged_dialog.h>
|
||||||
#include "panel_setup_drc_severities.h"
|
|
||||||
|
|
||||||
class PCB_EDIT_FRAME;
|
class PCB_EDIT_FRAME;
|
||||||
class PANEL_SETUP_FEATURE_CONSTRAINTS;
|
class PANEL_SETUP_FEATURE_CONSTRAINTS;
|
||||||
|
@ -32,6 +31,7 @@ class PANEL_SETUP_NETCLASSES;
|
||||||
class PANEL_SETUP_TRACKS_AND_VIAS;
|
class PANEL_SETUP_TRACKS_AND_VIAS;
|
||||||
class PANEL_SETUP_MASK_AND_PASTE;
|
class PANEL_SETUP_MASK_AND_PASTE;
|
||||||
class PANEL_SETUP_BOARD_STACKUP;
|
class PANEL_SETUP_BOARD_STACKUP;
|
||||||
|
class PANEL_SETUP_DRC_SEVERITIES;
|
||||||
|
|
||||||
|
|
||||||
class DIALOG_BOARD_SETUP : public PAGED_DIALOG
|
class DIALOG_BOARD_SETUP : public PAGED_DIALOG
|
||||||
|
|
|
@ -52,7 +52,7 @@ DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, PCB_EDIT_FRAME* aEditorFra
|
||||||
m_unconnectedTreeModel( nullptr ),
|
m_unconnectedTreeModel( nullptr ),
|
||||||
m_footprintWarningsProvider( nullptr ),
|
m_footprintWarningsProvider( nullptr ),
|
||||||
m_footprintWarningsTreeModel( nullptr ),
|
m_footprintWarningsTreeModel( nullptr ),
|
||||||
m_severities( SEVERITY_ERROR | SEVERITY_WARNING )
|
m_severities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING )
|
||||||
{
|
{
|
||||||
SetName( DIALOG_DRC_WINDOW_NAME ); // Set a window name to be able to find it
|
SetName( DIALOG_DRC_WINDOW_NAME ); // Set a window name to be able to find it
|
||||||
|
|
||||||
|
@ -180,15 +180,15 @@ void DIALOG_DRC_CONTROL::setDRCParameters()
|
||||||
|
|
||||||
|
|
||||||
// Don't globally define this; different facilities use different definitions of "ALL"
|
// Don't globally define this; different facilities use different definitions of "ALL"
|
||||||
static int SEVERITY_ALL = SEVERITY_WARNING | SEVERITY_ERROR | SEVERITY_EXCLUSION;
|
static int RPT_SEVERITY_ALL = RPT_SEVERITY_WARNING | RPT_SEVERITY_ERROR | RPT_SEVERITY_EXCLUSION;
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_DRC_CONTROL::syncCheckboxes()
|
void DIALOG_DRC_CONTROL::syncCheckboxes()
|
||||||
{
|
{
|
||||||
m_showAll->SetValue( m_severities == SEVERITY_ALL );
|
m_showAll->SetValue( m_severities == RPT_SEVERITY_ALL );
|
||||||
m_showErrors->SetValue( m_severities & SEVERITY_ERROR );
|
m_showErrors->SetValue( m_severities & RPT_SEVERITY_ERROR );
|
||||||
m_showWarnings->SetValue( m_severities & SEVERITY_WARNING );
|
m_showWarnings->SetValue( m_severities & RPT_SEVERITY_WARNING );
|
||||||
m_showExclusions->SetValue( m_severities & SEVERITY_EXCLUSION );
|
m_showExclusions->SetValue( m_severities & RPT_SEVERITY_EXCLUSION );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -284,8 +284,8 @@ void DIALOG_DRC_CONTROL::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
||||||
|
|
||||||
switch( m_BrdSettings.m_DRCSeverities[ drcItem->GetErrorCode() ] )
|
switch( m_BrdSettings.m_DRCSeverities[ drcItem->GetErrorCode() ] )
|
||||||
{
|
{
|
||||||
case SEVERITY_ERROR: listName = _( "errors" ); break;
|
case RPT_SEVERITY_ERROR: listName = _( "errors" ); break;
|
||||||
case SEVERITY_WARNING: listName = _( "warnings" ); break;
|
case RPT_SEVERITY_WARNING: listName = _( "warnings" ); break;
|
||||||
default: listName = _( "appropriate" ); break;
|
default: listName = _( "appropriate" ); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ void DIALOG_DRC_CONTROL::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
||||||
|
|
||||||
menu.AppendSeparator();
|
menu.AppendSeparator();
|
||||||
|
|
||||||
if( m_BrdSettings.m_DRCSeverities[ drcItem->GetErrorCode() ] == SEVERITY_WARNING )
|
if( m_BrdSettings.m_DRCSeverities[ drcItem->GetErrorCode() ] == RPT_SEVERITY_WARNING )
|
||||||
{
|
{
|
||||||
menu.Append( 3, wxString::Format( _( "Change severity to Error for all '%s' violations" ),
|
menu.Append( 3, wxString::Format( _( "Change severity to Error for all '%s' violations" ),
|
||||||
drcItem->GetErrorText(),
|
drcItem->GetErrorText(),
|
||||||
|
@ -333,7 +333,7 @@ void DIALOG_DRC_CONTROL::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
||||||
node->m_DrcItem->GetParent()->SetExcluded( true );
|
node->m_DrcItem->GetParent()->SetExcluded( true );
|
||||||
|
|
||||||
// Update view
|
// Update view
|
||||||
if( m_severities & SEVERITY_EXCLUSION )
|
if( m_severities & RPT_SEVERITY_EXCLUSION )
|
||||||
static_cast<DRC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
|
static_cast<DRC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
|
||||||
else
|
else
|
||||||
static_cast<DRC_TREE_MODEL*>( aEvent.GetModel() )->DeleteCurrentItem( false );
|
static_cast<DRC_TREE_MODEL*>( aEvent.GetModel() )->DeleteCurrentItem( false );
|
||||||
|
@ -342,7 +342,7 @@ void DIALOG_DRC_CONTROL::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
m_BrdSettings.m_DRCSeverities[ drcItem->GetErrorCode() ] = SEVERITY_ERROR;
|
m_BrdSettings.m_DRCSeverities[ drcItem->GetErrorCode() ] = RPT_SEVERITY_ERROR;
|
||||||
m_brdEditor->GetBoard()->SetDesignSettings( m_BrdSettings );
|
m_brdEditor->GetBoard()->SetDesignSettings( m_BrdSettings );
|
||||||
|
|
||||||
// Rebuild model and view
|
// Rebuild model and view
|
||||||
|
@ -351,7 +351,7 @@ void DIALOG_DRC_CONTROL::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
m_BrdSettings.m_DRCSeverities[ drcItem->GetErrorCode() ] = SEVERITY_WARNING;
|
m_BrdSettings.m_DRCSeverities[ drcItem->GetErrorCode() ] = RPT_SEVERITY_WARNING;
|
||||||
m_brdEditor->GetBoard()->SetDesignSettings( m_BrdSettings );
|
m_brdEditor->GetBoard()->SetDesignSettings( m_BrdSettings );
|
||||||
|
|
||||||
// Rebuild model and view
|
// Rebuild model and view
|
||||||
|
@ -360,7 +360,7 @@ void DIALOG_DRC_CONTROL::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
m_BrdSettings.m_DRCSeverities[ drcItem->GetErrorCode() ] = SEVERITY_IGNORE;
|
m_BrdSettings.m_DRCSeverities[ drcItem->GetErrorCode() ] = RPT_SEVERITY_IGNORE;
|
||||||
m_brdEditor->GetBoard()->SetDesignSettings( m_BrdSettings );
|
m_brdEditor->GetBoard()->SetDesignSettings( m_BrdSettings );
|
||||||
|
|
||||||
for( MARKER_PCB* marker : m_brdEditor->GetBoard()->Markers() )
|
for( MARKER_PCB* marker : m_brdEditor->GetBoard()->Markers() )
|
||||||
|
@ -382,18 +382,18 @@ void DIALOG_DRC_CONTROL::OnSeverity( wxCommandEvent& aEvent )
|
||||||
int flag = 0;
|
int flag = 0;
|
||||||
|
|
||||||
if( aEvent.GetEventObject() == m_showAll )
|
if( aEvent.GetEventObject() == m_showAll )
|
||||||
flag = SEVERITY_ALL;
|
flag = RPT_SEVERITY_ALL;
|
||||||
else if( aEvent.GetEventObject() == m_showErrors )
|
else if( aEvent.GetEventObject() == m_showErrors )
|
||||||
flag = SEVERITY_ERROR;
|
flag = RPT_SEVERITY_ERROR;
|
||||||
else if( aEvent.GetEventObject() == m_showWarnings )
|
else if( aEvent.GetEventObject() == m_showWarnings )
|
||||||
flag = SEVERITY_WARNING;
|
flag = RPT_SEVERITY_WARNING;
|
||||||
else if( aEvent.GetEventObject() == m_showExclusions )
|
else if( aEvent.GetEventObject() == m_showExclusions )
|
||||||
flag = SEVERITY_EXCLUSION;
|
flag = RPT_SEVERITY_EXCLUSION;
|
||||||
|
|
||||||
if( aEvent.IsChecked() )
|
if( aEvent.IsChecked() )
|
||||||
m_severities |= flag;
|
m_severities |= flag;
|
||||||
else if( aEvent.GetEventObject() == m_showAll )
|
else if( aEvent.GetEventObject() == m_showAll )
|
||||||
m_severities = SEVERITY_ERROR;
|
m_severities = RPT_SEVERITY_ERROR;
|
||||||
else
|
else
|
||||||
m_severities &= ~flag;
|
m_severities &= ~flag;
|
||||||
|
|
||||||
|
@ -618,26 +618,26 @@ void DIALOG_DRC_CONTROL::updateDisplayedCounts()
|
||||||
|
|
||||||
if( m_markersProvider )
|
if( m_markersProvider )
|
||||||
{
|
{
|
||||||
numErrors += m_markersProvider->GetCount( SEVERITY_ERROR );
|
numErrors += m_markersProvider->GetCount( RPT_SEVERITY_ERROR );
|
||||||
numWarnings += m_markersProvider->GetCount( SEVERITY_WARNING );
|
numWarnings += m_markersProvider->GetCount( RPT_SEVERITY_WARNING );
|
||||||
numExcluded += m_markersProvider->GetCount( SEVERITY_EXCLUSION );
|
numExcluded += m_markersProvider->GetCount( RPT_SEVERITY_EXCLUSION );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_unconnectedItemsProvider )
|
if( m_unconnectedItemsProvider )
|
||||||
{
|
{
|
||||||
numErrors += m_unconnectedItemsProvider->GetCount( SEVERITY_ERROR );
|
numErrors += m_unconnectedItemsProvider->GetCount( RPT_SEVERITY_ERROR );
|
||||||
numWarnings += m_unconnectedItemsProvider->GetCount( SEVERITY_WARNING );
|
numWarnings += m_unconnectedItemsProvider->GetCount( RPT_SEVERITY_WARNING );
|
||||||
numExcluded += m_unconnectedItemsProvider->GetCount( SEVERITY_EXCLUSION );
|
numExcluded += m_unconnectedItemsProvider->GetCount( RPT_SEVERITY_EXCLUSION );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_footprintWarningsProvider )
|
if( m_footprintWarningsProvider )
|
||||||
{
|
{
|
||||||
numErrors += m_footprintWarningsProvider->GetCount( SEVERITY_ERROR );
|
numErrors += m_footprintWarningsProvider->GetCount( RPT_SEVERITY_ERROR );
|
||||||
numWarnings += m_footprintWarningsProvider->GetCount( SEVERITY_WARNING );
|
numWarnings += m_footprintWarningsProvider->GetCount( RPT_SEVERITY_WARNING );
|
||||||
numExcluded += m_footprintWarningsProvider->GetCount( SEVERITY_EXCLUSION );
|
numExcluded += m_footprintWarningsProvider->GetCount( RPT_SEVERITY_EXCLUSION );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_errorsBadge->SetBitmap( MakeBadge( SEVERITY_ERROR, numErrors, m_errorsBadge ) );
|
m_errorsBadge->SetBitmap( MakeBadge( RPT_SEVERITY_ERROR, numErrors, m_errorsBadge ) );
|
||||||
m_warningsBadge->SetBitmap( MakeBadge( SEVERITY_WARNING, numWarnings, m_warningsBadge ) );
|
m_warningsBadge->SetBitmap( MakeBadge( RPT_SEVERITY_WARNING, numWarnings, m_warningsBadge ) );
|
||||||
m_exclusionsBadge->SetBitmap( MakeBadge( SEVERITY_EXCLUSION, numExcluded, m_exclusionsBadge ) );
|
m_exclusionsBadge->SetBitmap( MakeBadge( RPT_SEVERITY_EXCLUSION, numExcluded, m_exclusionsBadge ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,7 +366,7 @@ bool DIALOG_EXCHANGE_FOOTPRINTS::processModule( MODULE* aModule, const LIB_ID& a
|
||||||
if( !newModule )
|
if( !newModule )
|
||||||
{
|
{
|
||||||
msg << ": " << _( "*** footprint not found ***" );
|
msg << ": " << _( "*** footprint not found ***" );
|
||||||
m_MessageWindow->Report( msg, SEVERITY_ERROR );
|
m_MessageWindow->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ bool DIALOG_EXCHANGE_FOOTPRINTS::processModule( MODULE* aModule, const LIB_ID& a
|
||||||
m_currentModule = newModule;
|
m_currentModule = newModule;
|
||||||
|
|
||||||
msg += ": OK";
|
msg += ": OK";
|
||||||
m_MessageWindow->Report( msg, SEVERITY_ACTION );
|
m_MessageWindow->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,7 +337,7 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
||||||
bool success = false;
|
bool success = false;
|
||||||
wxArrayString output, errors;
|
wxArrayString output, errors;
|
||||||
REPORTER& reporter = m_messagesPanel->Reporter();
|
REPORTER& reporter = m_messagesPanel->Reporter();
|
||||||
reporter.ReportHead( wxString::Format( _( "Executing '%s'" ), cmdK2S ), SEVERITY_ACTION );
|
reporter.ReportHead( wxString::Format( _( "Executing '%s'" ), cmdK2S ), RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
{
|
{
|
||||||
wxBusyCursor dummy;
|
wxBusyCursor dummy;
|
||||||
|
@ -356,23 +356,23 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
for( auto& err : errors )
|
for( auto& err : errors )
|
||||||
reporter.Report( err, SEVERITY_WARNING );
|
reporter.Report( err, RPT_SEVERITY_WARNING );
|
||||||
|
|
||||||
if( result ) // Any troubles?
|
if( result ) // Any troubles?
|
||||||
{
|
{
|
||||||
if( !success )
|
if( !success )
|
||||||
{
|
{
|
||||||
reporter.ReportTail( _( "Unable to create STEP file. Check that the board has a "
|
reporter.ReportTail( _( "Unable to create STEP file. Check that the board has a "
|
||||||
"valid outline and models." ), SEVERITY_ERROR );
|
"valid outline and models." ), RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
reporter.ReportTail( _( "STEP file has been created, but there are warnings." ),
|
reporter.ReportTail( _( "STEP file has been created, but there are warnings." ),
|
||||||
SEVERITY_INFO );
|
RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
reporter.ReportTail( _( "STEP file has been created successfully." ), SEVERITY_INFO );
|
reporter.ReportTail( _( "STEP file has been created successfully." ), RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,12 +262,12 @@ void DIALOG_EXPORT_SVG::ExportSVGFile( bool aOnlyOneFile )
|
||||||
|
|
||||||
if( CreateSVGFile( path ) )
|
if( CreateSVGFile( path ) )
|
||||||
{
|
{
|
||||||
reporter.Report( wxString::Format( _( "Exported \"%s\"." ), path ), SEVERITY_ACTION );
|
reporter.Report( wxString::Format( _( "Exported \"%s\"." ), path ), RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
else // Error
|
else // Error
|
||||||
{
|
{
|
||||||
reporter.Report( wxString::Format( _( "Unable to create file \"%s\"." ), path ),
|
reporter.Report( wxString::Format( _( "Unable to create file \"%s\"." ), path ),
|
||||||
SEVERITY_ERROR );
|
RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aOnlyOneFile )
|
if( aOnlyOneFile )
|
||||||
|
|
|
@ -222,7 +222,7 @@ void DIALOG_NETLIST::onFilenameChanged()
|
||||||
{
|
{
|
||||||
m_MessageWindow->Clear();
|
m_MessageWindow->Clear();
|
||||||
REPORTER& reporter = m_MessageWindow->Reporter();
|
REPORTER& reporter = m_MessageWindow->Reporter();
|
||||||
reporter.Report( _( "The netlist file does not exist." ), SEVERITY_ERROR );
|
reporter.Report( _( "The netlist file does not exist." ), RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -272,14 +272,14 @@ void DIALOG_NETLIST::loadNetlist( bool aDryRun )
|
||||||
|
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "Reading netlist file \"%s\".\n" ), GetChars( netlistFileName ) );
|
msg.Printf( _( "Reading netlist file \"%s\".\n" ), GetChars( netlistFileName ) );
|
||||||
reporter.ReportHead( msg, SEVERITY_INFO );
|
reporter.ReportHead( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( m_matchByTimestamp->GetSelection() == 1 )
|
if( m_matchByTimestamp->GetSelection() == 1 )
|
||||||
msg = _( "Using references to match components and footprints.\n" );
|
msg = _( "Using references to match components and footprints.\n" );
|
||||||
else
|
else
|
||||||
msg = _( "Using time stamp fields (UUID) to match components and footprints.\n" );
|
msg = _( "Using time stamp fields (UUID) to match components and footprints.\n" );
|
||||||
|
|
||||||
reporter.ReportHead( msg, SEVERITY_INFO );
|
reporter.ReportHead( msg, RPT_SEVERITY_INFO );
|
||||||
m_MessageWindow->SetLazyUpdate( true ); // Use lazy update to speed the creation of the report
|
m_MessageWindow->SetLazyUpdate( true ); // Use lazy update to speed the creation of the report
|
||||||
// (the window is not updated for each message)
|
// (the window is not updated for each message)
|
||||||
m_matchByUUID = m_matchByTimestamp->GetSelection() == 0;
|
m_matchByUUID = m_matchByTimestamp->GetSelection() == 0;
|
||||||
|
|
|
@ -613,7 +613,7 @@ void DIALOG_PLOT::applyPlotSettings()
|
||||||
{
|
{
|
||||||
m_defaultPenSize.SetValue( tempOptions.GetHPGLPenDiameter() * IU_PER_MILS );
|
m_defaultPenSize.SetValue( tempOptions.GetHPGLPenDiameter() * IU_PER_MILS );
|
||||||
msg.Printf( _( "HPGL pen size constrained." ) );
|
msg.Printf( _( "HPGL pen size constrained." ) );
|
||||||
reporter.Report( msg, SEVERITY_INFO );
|
reporter.Report( msg, RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // keep the last value (initial value if no HPGL plot made)
|
else // keep the last value (initial value if no HPGL plot made)
|
||||||
|
@ -624,7 +624,7 @@ void DIALOG_PLOT::applyPlotSettings()
|
||||||
{
|
{
|
||||||
m_defaultLineWidth.SetValue( tempOptions.GetLineWidth() );
|
m_defaultLineWidth.SetValue( tempOptions.GetLineWidth() );
|
||||||
msg.Printf( _( "Default line width constrained." ) );
|
msg.Printf( _( "Default line width constrained." ) );
|
||||||
reporter.Report( msg, SEVERITY_INFO );
|
reporter.Report( msg, RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
|
|
||||||
// X scale
|
// X scale
|
||||||
|
@ -637,7 +637,7 @@ void DIALOG_PLOT::applyPlotSettings()
|
||||||
msg.Printf( wxT( "%f" ), m_XScaleAdjust );
|
msg.Printf( wxT( "%f" ), m_XScaleAdjust );
|
||||||
m_fineAdjustXCtrl->SetValue( msg );
|
m_fineAdjustXCtrl->SetValue( msg );
|
||||||
msg.Printf( _( "X scale constrained." ) );
|
msg.Printf( _( "X scale constrained." ) );
|
||||||
reporter.Report( msg, SEVERITY_INFO );
|
reporter.Report( msg, RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Y scale
|
// Y scale
|
||||||
|
@ -649,7 +649,7 @@ void DIALOG_PLOT::applyPlotSettings()
|
||||||
msg.Printf( wxT( "%f" ), m_YScaleAdjust );
|
msg.Printf( wxT( "%f" ), m_YScaleAdjust );
|
||||||
m_fineAdjustYCtrl->SetValue( msg );
|
m_fineAdjustYCtrl->SetValue( msg );
|
||||||
msg.Printf( _( "Y scale constrained." ) );
|
msg.Printf( _( "Y scale constrained." ) );
|
||||||
reporter.Report( msg, SEVERITY_INFO );
|
reporter.Report( msg, RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
|
|
||||||
auto cfg = m_parent->GetSettings();
|
auto cfg = m_parent->GetSettings();
|
||||||
|
@ -670,7 +670,7 @@ void DIALOG_PLOT::applyPlotSettings()
|
||||||
StringFromValue( GetUserUnits(), m_widthAdjustMinValue, false, true ),
|
StringFromValue( GetUserUnits(), m_widthAdjustMinValue, false, true ),
|
||||||
StringFromValue( GetUserUnits(), m_widthAdjustMaxValue, false, true ),
|
StringFromValue( GetUserUnits(), m_widthAdjustMaxValue, false, true ),
|
||||||
GetAbbreviatedUnitsLabel( GetUserUnits(), true ) );
|
GetAbbreviatedUnitsLabel( GetUserUnits(), true ) );
|
||||||
reporter.Report( msg, SEVERITY_WARNING );
|
reporter.Report( msg, RPT_SEVERITY_WARNING );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store m_PSWidthAdjust in mm in user config
|
// Store m_PSWidthAdjust in mm in user config
|
||||||
|
@ -856,12 +856,12 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
|
||||||
delete plotter;
|
delete plotter;
|
||||||
|
|
||||||
msg.Printf( _( "Plot file \"%s\" created." ), fn.GetFullPath() );
|
msg.Printf( _( "Plot file \"%s\" created." ), fn.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ACTION );
|
reporter.Report( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Unable to create file \"%s\"." ), fn.GetFullPath() );
|
msg.Printf( _( "Unable to create file \"%s\"." ), fn.GetFullPath() );
|
||||||
reporter.Report( msg, SEVERITY_ERROR );
|
reporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSafeYield(); // displays report message.
|
wxSafeYield(); // displays report message.
|
||||||
|
|
|
@ -58,7 +58,7 @@ PANEL_SETUP_DRC_SEVERITIES::PANEL_SETUP_DRC_SEVERITIES( PAGED_DIALOG* aParent,
|
||||||
wxPanel* radioPanel = new wxPanel( scrollWin );
|
wxPanel* radioPanel = new wxPanel( scrollWin );
|
||||||
wxBoxSizer* radioSizer = new wxBoxSizer( wxHORIZONTAL );
|
wxBoxSizer* radioSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
for( int i = 0; i < sizeof( severities ) / sizeof( wxString ); ++i )
|
for( size_t i = 0; i < sizeof( severities ) / sizeof( wxString ); ++i )
|
||||||
{
|
{
|
||||||
m_buttonMap[errorCode][i] = new wxRadioButton( radioPanel,
|
m_buttonMap[errorCode][i] = new wxRadioButton( radioPanel,
|
||||||
baseID + errorCode * 10 + i,
|
baseID + errorCode * 10 + i,
|
||||||
|
@ -95,9 +95,9 @@ void PANEL_SETUP_DRC_SEVERITIES::ImportSettingsFrom( BOARD* aBoard )
|
||||||
{
|
{
|
||||||
switch( entry.second )
|
switch( entry.second )
|
||||||
{
|
{
|
||||||
case SEVERITY_ERROR: m_buttonMap[entry.first][0]->SetValue( true ); break;
|
case RPT_SEVERITY_ERROR: m_buttonMap[entry.first][0]->SetValue( true ); break;
|
||||||
case SEVERITY_WARNING: m_buttonMap[entry.first][1]->SetValue( true ); break;
|
case RPT_SEVERITY_WARNING: m_buttonMap[entry.first][1]->SetValue( true ); break;
|
||||||
case SEVERITY_IGNORE: m_buttonMap[entry.first][2]->SetValue( true ); break;
|
case RPT_SEVERITY_IGNORE: m_buttonMap[entry.first][2]->SetValue( true ); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,9 +112,9 @@ bool PANEL_SETUP_DRC_SEVERITIES::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
switch( entry.second )
|
switch( entry.second )
|
||||||
{
|
{
|
||||||
case SEVERITY_ERROR: m_buttonMap[entry.first][0]->SetValue( true ); break;
|
case RPT_SEVERITY_ERROR: m_buttonMap[entry.first][0]->SetValue( true ); break;
|
||||||
case SEVERITY_WARNING: m_buttonMap[entry.first][1]->SetValue( true ); break;
|
case RPT_SEVERITY_WARNING: m_buttonMap[entry.first][1]->SetValue( true ); break;
|
||||||
case SEVERITY_IGNORE: m_buttonMap[entry.first][2]->SetValue( true ); break;
|
case RPT_SEVERITY_IGNORE: m_buttonMap[entry.first][2]->SetValue( true ); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,14 +127,14 @@ bool PANEL_SETUP_DRC_SEVERITIES::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
for( auto const& entry : m_buttonMap )
|
for( auto const& entry : m_buttonMap )
|
||||||
{
|
{
|
||||||
int severity = SEVERITY_UNDEFINED;
|
int severity = RPT_SEVERITY_UNDEFINED;
|
||||||
|
|
||||||
if( entry.second[0]->GetValue() )
|
if( entry.second[0]->GetValue() )
|
||||||
severity = SEVERITY_ERROR;
|
severity = RPT_SEVERITY_ERROR;
|
||||||
else if( entry.second[1]->GetValue() )
|
else if( entry.second[1]->GetValue() )
|
||||||
severity = SEVERITY_WARNING;
|
severity = RPT_SEVERITY_WARNING;
|
||||||
else if( entry.second[2]->GetValue() )
|
else if( entry.second[2]->GetValue() )
|
||||||
severity = SEVERITY_IGNORE;
|
severity = RPT_SEVERITY_IGNORE;
|
||||||
|
|
||||||
m_brdSettings.m_DRCSeverities[ entry.first ] = severity;
|
m_brdSettings.m_DRCSeverities[ entry.first ] = severity;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#define KICAD_PANEL_SETUP_DRC_SEVERITIES_H
|
#define KICAD_PANEL_SETUP_DRC_SEVERITIES_H
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <wx/generic/panelg.h>
|
#include <wx/panel.h>
|
||||||
|
|
||||||
|
|
||||||
class BOARD;
|
class BOARD;
|
||||||
|
|
|
@ -74,7 +74,7 @@ DRC::DRC() :
|
||||||
m_drcRun = false;
|
m_drcRun = false;
|
||||||
m_footprintsTested = false;
|
m_footprintsTested = false;
|
||||||
|
|
||||||
m_severities = SEVERITY_ERROR | SEVERITY_WARNING;
|
m_severities = RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING;
|
||||||
|
|
||||||
m_segmAngle = 0;
|
m_segmAngle = 0;
|
||||||
m_segmLength = 0;
|
m_segmLength = 0;
|
||||||
|
|
|
@ -196,9 +196,9 @@ void DRC_TREE_MODEL::GetValue( wxVariant& aVariant,
|
||||||
{
|
{
|
||||||
auto& bds = m_parentFrame->GetBoard()->GetDesignSettings();
|
auto& bds = m_parentFrame->GetBoard()->GetDesignSettings();
|
||||||
bool excluded = drcItem->GetParent() && drcItem->GetParent()->IsExcluded();
|
bool excluded = drcItem->GetParent() && drcItem->GetParent()->IsExcluded();
|
||||||
bool error = bds.m_DRCSeverities[ drcItem->GetErrorCode() ] == SEVERITY_ERROR;
|
bool error = bds.m_DRCSeverities[ drcItem->GetErrorCode() ] == RPT_SEVERITY_ERROR;
|
||||||
wxString prefix = wxString::Format( wxT( "%s%s" ),
|
wxString prefix = wxString::Format( wxT( "%s%s" ),
|
||||||
excluded ? _( "Excluded " ) : wxEmptyString,
|
excluded ? _( "Excluded " ) : wxString( "" ),
|
||||||
error ? _( "Error: " ) : _( "Warning: " ) );
|
error ? _( "Error: " ) : _( "Warning: " ) );
|
||||||
|
|
||||||
aVariant = prefix + drcItem->GetErrorText();
|
aVariant = prefix + drcItem->GetErrorText();
|
||||||
|
|
|
@ -104,7 +104,7 @@ public:
|
||||||
int markerSeverity;
|
int markerSeverity;
|
||||||
|
|
||||||
if( marker->IsExcluded() )
|
if( marker->IsExcluded() )
|
||||||
markerSeverity = SEVERITY_EXCLUSION;
|
markerSeverity = RPT_SEVERITY_EXCLUSION;
|
||||||
else
|
else
|
||||||
markerSeverity = bds.GetSeverity( marker->GetReporter().GetErrorCode() );
|
markerSeverity = bds.GetSeverity( marker->GetReporter().GetErrorCode() );
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ public:
|
||||||
int markerSeverity;
|
int markerSeverity;
|
||||||
|
|
||||||
if( marker->IsExcluded() )
|
if( marker->IsExcluded() )
|
||||||
markerSeverity = SEVERITY_EXCLUSION;
|
markerSeverity = RPT_SEVERITY_EXCLUSION;
|
||||||
else
|
else
|
||||||
markerSeverity = bds.GetSeverity( marker->GetReporter().GetErrorCode() );
|
markerSeverity = bds.GetSeverity( marker->GetReporter().GetErrorCode() );
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ public:
|
||||||
|
|
||||||
if( aDeep )
|
if( aDeep )
|
||||||
{
|
{
|
||||||
for( int i = 0; i < m_sourceVector->size(); ++i )
|
for( size_t i = 0; i < m_sourceVector->size(); ++i )
|
||||||
{
|
{
|
||||||
if( m_sourceVector->at( i ) == item )
|
if( m_sourceVector->at( i ) == item )
|
||||||
{
|
{
|
||||||
|
|
|
@ -191,7 +191,7 @@ private:
|
||||||
_( "File contains pad shapes that are not supported by the Hyperlynx exporter\n"
|
_( "File contains pad shapes that are not supported by the Hyperlynx exporter\n"
|
||||||
"(Supported shapes are oval, rectangle, circle.)\n"
|
"(Supported shapes are oval, rectangle, circle.)\n"
|
||||||
"They have been exported as oval pads." ),
|
"They have been exported as oval pads." ),
|
||||||
SEVERITY_WARNING );
|
RPT_SEVERITY_WARNING );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,15 +270,15 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles()
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Unable to create \"%s\"." ), fn.GetFullPath() );
|
msg.Printf( _( "Unable to create \"%s\"." ), fn.GetFullPath() );
|
||||||
wxMessageBox( msg );
|
wxMessageBox( msg );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg.Printf( _( "Front side (top side) place file: \"%s\"." ), filename );
|
msg.Printf( _( "Front side (top side) place file: \"%s\"." ), filename );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
msg.Printf( _( "Component count: %d." ), fpcount );
|
msg.Printf( _( "Component count: %d." ), fpcount );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
// Create the Back or Bottom side placement file
|
// Create the Back or Bottom side placement file
|
||||||
fullcount = fpcount;
|
fullcount = fpcount;
|
||||||
|
@ -290,24 +290,24 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles()
|
||||||
if( fpcount < 0 )
|
if( fpcount < 0 )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Unable to create file \"%s\"." ), filename );
|
msg.Printf( _( "Unable to create file \"%s\"." ), filename );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
wxMessageBox( msg );
|
wxMessageBox( msg );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display results
|
// Display results
|
||||||
msg.Printf( _( "Back side (bottom side) place file: \"%s\"." ), filename );
|
msg.Printf( _( "Back side (bottom side) place file: \"%s\"." ), filename );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
msg.Printf( _( "Component count: %d." ), fpcount );
|
msg.Printf( _( "Component count: %d." ), fpcount );
|
||||||
|
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
fullcount += fpcount;
|
fullcount += fpcount;
|
||||||
msg.Printf( _( "Full component count: %d\n" ), fullcount );
|
msg.Printf( _( "Full component count: %d\n" ), fullcount );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
m_reporter->Report( _( "Component Placement File generation OK." ), SEVERITY_ACTION );
|
m_reporter->Report( _( "Component Placement File generation OK." ), RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -343,7 +343,7 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles()
|
||||||
for( MODULE* item : fp_no_smd_list )
|
for( MODULE* item : fp_no_smd_list )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "footprint %s (not set as SMD) forced in list" ), item->GetReference() );
|
msg.Printf( _( "footprint %s (not set as SMD) forced in list" ), item->GetReference() );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -395,7 +395,7 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles()
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Unable to create \"%s\"." ), fn.GetFullPath() );
|
msg.Printf( _( "Unable to create \"%s\"." ), fn.GetFullPath() );
|
||||||
wxMessageBox( msg );
|
wxMessageBox( msg );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,14 +404,14 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles()
|
||||||
else
|
else
|
||||||
msg.Printf( _( "Front side (top side) place file: \"%s\"." ),
|
msg.Printf( _( "Front side (top side) place file: \"%s\"." ),
|
||||||
fn.GetFullPath() );
|
fn.GetFullPath() );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
msg.Printf( _( "Component count: %d." ), fpcount );
|
msg.Printf( _( "Component count: %d." ), fpcount );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( singleFile )
|
if( singleFile )
|
||||||
{
|
{
|
||||||
m_reporter->Report( _( "Component Placement File generation OK." ), SEVERITY_ACTION );
|
m_reporter->Report( _( "Component Placement File generation OK." ), RPT_SEVERITY_ACTION );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,7 +437,7 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles()
|
||||||
if( fpcount < 0 )
|
if( fpcount < 0 )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Unable to create file \"%s\"." ), fn.GetFullPath() );
|
msg.Printf( _( "Unable to create file \"%s\"." ), fn.GetFullPath() );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
wxMessageBox( msg );
|
wxMessageBox( msg );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -446,21 +446,21 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles()
|
||||||
if( !singleFile )
|
if( !singleFile )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Back side (bottom side) place file: \"%s\"." ), fn.GetFullPath() );
|
msg.Printf( _( "Back side (bottom side) place file: \"%s\"." ), fn.GetFullPath() );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
msg.Printf( _( "Component count: %d." ), fpcount );
|
msg.Printf( _( "Component count: %d." ), fpcount );
|
||||||
|
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !singleFile )
|
if( !singleFile )
|
||||||
{
|
{
|
||||||
fullcount += fpcount;
|
fullcount += fpcount;
|
||||||
msg.Printf( _( "Full component count: %d\n" ), fullcount );
|
msg.Printf( _( "Full component count: %d\n" ), fullcount );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_reporter->Report( _( "Component Placement File generation OK." ), SEVERITY_ACTION );
|
m_reporter->Report( _( "Component Placement File generation OK." ), RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,13 +150,13 @@ bool GERBER_JOBFILE_WRITER::CreateJobFile( const wxString& aFullFilename )
|
||||||
if( m_reporter )
|
if( m_reporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Unable to create job file \"%s\"" ), aFullFilename );
|
msg.Printf( _( "Unable to create job file \"%s\"" ), aFullFilename );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( m_reporter )
|
else if( m_reporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Create Gerber job file \"%s\"" ), aFullFilename );
|
msg.Printf( _( "Create Gerber job file \"%s\"" ), aFullFilename );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
@ -404,7 +404,7 @@ void GERBER_JOBFILE_WRITER::addJSONFilesAttributes()
|
||||||
|
|
||||||
default:
|
default:
|
||||||
skip_file = true;
|
skip_file = true;
|
||||||
m_reporter->Report( "Unexpected layer id in job file", SEVERITY_ERROR );
|
m_reporter->Report( "Unexpected layer id in job file", RPT_SEVERITY_ERROR );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -555,7 +555,7 @@ void GERBER_JOBFILE_WRITER::addJSONMaterialStackup()
|
||||||
if( !uptodate && m_pcb->GetDesignSettings().m_HasStackup )
|
if( !uptodate && m_pcb->GetDesignSettings().m_HasStackup )
|
||||||
m_reporter->Report( _( "Board stackup settings not up to date\n"
|
m_reporter->Report( _( "Board stackup settings not up to date\n"
|
||||||
"Please fix the stackup" ),
|
"Please fix the stackup" ),
|
||||||
SEVERITY_ERROR );
|
RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
PCB_LAYER_ID last_copper_layer = F_Cu;
|
PCB_LAYER_ID last_copper_layer = F_Cu;
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ MODULE* BOARD_NETLIST_UPDATER::addNewComponent( COMPONENT* aComponent )
|
||||||
msg.Printf( _( "Cannot add %s (no footprint assigned)." ),
|
msg.Printf( _( "Cannot add %s (no footprint assigned)." ),
|
||||||
aComponent->GetReference(),
|
aComponent->GetReference(),
|
||||||
aComponent->GetFPID().Format().wx_str() );
|
aComponent->GetFPID().Format().wx_str() );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
++m_errorCount;
|
++m_errorCount;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ MODULE* BOARD_NETLIST_UPDATER::addNewComponent( COMPONENT* aComponent )
|
||||||
msg.Printf( _( "Cannot add %s (footprint \"%s\" not found)." ),
|
msg.Printf( _( "Cannot add %s (footprint \"%s\" not found)." ),
|
||||||
aComponent->GetReference(),
|
aComponent->GetReference(),
|
||||||
aComponent->GetFPID().Format().wx_str() );
|
aComponent->GetFPID().Format().wx_str() );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
++m_errorCount;
|
++m_errorCount;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ MODULE* BOARD_NETLIST_UPDATER::addNewComponent( COMPONENT* aComponent )
|
||||||
msg.Printf( _( "Add %s (footprint \"%s\")." ),
|
msg.Printf( _( "Add %s (footprint \"%s\")." ),
|
||||||
aComponent->GetReference(),
|
aComponent->GetReference(),
|
||||||
aComponent->GetFPID().Format().wx_str() );
|
aComponent->GetFPID().Format().wx_str() );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
// Set the pads ratsnest settings to the global settings
|
// Set the pads ratsnest settings to the global settings
|
||||||
bool set_ratsnest = m_frame->GetDisplayOptions().m_ShowGlobalRatsnest;
|
bool set_ratsnest = m_frame->GetDisplayOptions().m_ShowGlobalRatsnest;
|
||||||
|
@ -201,7 +201,7 @@ MODULE* BOARD_NETLIST_UPDATER::replaceComponent( NETLIST& aNetlist, MODULE* aPcb
|
||||||
msg.Printf( _( "Cannot update %s (no footprint assigned)." ),
|
msg.Printf( _( "Cannot update %s (no footprint assigned)." ),
|
||||||
aNewComponent->GetReference(),
|
aNewComponent->GetReference(),
|
||||||
aNewComponent->GetFPID().Format().wx_str() );
|
aNewComponent->GetFPID().Format().wx_str() );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
++m_errorCount;
|
++m_errorCount;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ MODULE* BOARD_NETLIST_UPDATER::replaceComponent( NETLIST& aNetlist, MODULE* aPcb
|
||||||
msg.Printf( _( "Cannot update %s (footprint \"%s\" not found)." ),
|
msg.Printf( _( "Cannot update %s (footprint \"%s\" not found)." ),
|
||||||
aNewComponent->GetReference(),
|
aNewComponent->GetReference(),
|
||||||
aNewComponent->GetFPID().Format().wx_str() );
|
aNewComponent->GetFPID().Format().wx_str() );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
++m_errorCount;
|
++m_errorCount;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ MODULE* BOARD_NETLIST_UPDATER::replaceComponent( NETLIST& aNetlist, MODULE* aPcb
|
||||||
aPcbComponent->GetReference(),
|
aPcbComponent->GetReference(),
|
||||||
aPcbComponent->GetFPID().Format().wx_str(),
|
aPcbComponent->GetFPID().Format().wx_str(),
|
||||||
aNewComponent->GetFPID().Format().wx_str() );
|
aNewComponent->GetFPID().Format().wx_str() );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
m_newFootprintsCount++;
|
m_newFootprintsCount++;
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentParameters( MODULE* aPcbComponent,
|
||||||
msg.Printf( _( "Change %s reference to %s." ),
|
msg.Printf( _( "Change %s reference to %s." ),
|
||||||
aPcbComponent->GetReference(),
|
aPcbComponent->GetReference(),
|
||||||
aNewComponent->GetReference() );
|
aNewComponent->GetReference() );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
if ( !m_isDryRun )
|
if ( !m_isDryRun )
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentParameters( MODULE* aPcbComponent,
|
||||||
aPcbComponent->GetReference(),
|
aPcbComponent->GetReference(),
|
||||||
aPcbComponent->GetValue(),
|
aPcbComponent->GetValue(),
|
||||||
aNewComponent->GetValue() );
|
aNewComponent->GetValue() );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
if( !m_isDryRun )
|
if( !m_isDryRun )
|
||||||
{
|
{
|
||||||
|
@ -285,7 +285,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentParameters( MODULE* aPcbComponent,
|
||||||
aPcbComponent->GetReference(),
|
aPcbComponent->GetReference(),
|
||||||
aPcbComponent->GetPath().AsString(),
|
aPcbComponent->GetPath().AsString(),
|
||||||
aNewComponent->GetPath().AsString() );
|
aNewComponent->GetPath().AsString() );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
if( !m_isDryRun )
|
if( !m_isDryRun )
|
||||||
{
|
{
|
||||||
|
@ -341,7 +341,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
|
||||||
msg.Printf( _( "Disconnect %s pin %s." ),
|
msg.Printf( _( "Disconnect %s pin %s." ),
|
||||||
aPcbComponent->GetReference(),
|
aPcbComponent->GetReference(),
|
||||||
pad->GetName() );
|
pad->GetName() );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
else if( m_warnForNoNetPads && pad->IsOnCopperLayer() && !pad->GetName().IsEmpty() )
|
else if( m_warnForNoNetPads && pad->IsOnCopperLayer() && !pad->GetName().IsEmpty() )
|
||||||
{
|
{
|
||||||
|
@ -349,7 +349,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
|
||||||
msg.Printf( _( "No net for component %s pin %s." ),
|
msg.Printf( _( "No net for component %s pin %s." ),
|
||||||
aPcbComponent->GetReference(),
|
aPcbComponent->GetReference(),
|
||||||
pad->GetName() );
|
pad->GetName() );
|
||||||
m_reporter->Report( msg, SEVERITY_WARNING);
|
m_reporter->Report( msg, RPT_SEVERITY_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !m_isDryRun )
|
if( !m_isDryRun )
|
||||||
|
@ -397,7 +397,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
|
||||||
|
|
||||||
m_addedNets[netName] = netinfo;
|
m_addedNets[netName] = netinfo;
|
||||||
msg.Printf( _( "Add net %s." ), UnescapeString( netName ) );
|
msg.Printf( _( "Add net %s." ), UnescapeString( netName ) );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !pad->GetNetname().IsEmpty() )
|
if( !pad->GetNetname().IsEmpty() )
|
||||||
|
@ -417,7 +417,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
|
||||||
pad->GetName(),
|
pad->GetName(),
|
||||||
UnescapeString( netName ) );
|
UnescapeString( netName ) );
|
||||||
}
|
}
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
if( !m_isDryRun )
|
if( !m_isDryRun )
|
||||||
{
|
{
|
||||||
|
@ -488,7 +488,7 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Reconnect via from %s to %s." ),
|
msg.Printf( _( "Reconnect via from %s to %s." ),
|
||||||
UnescapeString( via->GetNetname() ), UnescapeString( updatedNetname ) );
|
UnescapeString( via->GetNetname() ), UnescapeString( updatedNetname ) );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
if( !m_isDryRun )
|
if( !m_isDryRun )
|
||||||
{
|
{
|
||||||
|
@ -508,7 +508,7 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Via connected to unknown net (%s)." ),
|
msg.Printf( _( "Via connected to unknown net (%s)." ),
|
||||||
UnescapeString( via->GetNetname() ) );
|
UnescapeString( via->GetNetname() ) );
|
||||||
m_reporter->Report( msg, SEVERITY_WARNING );
|
m_reporter->Report( msg, RPT_SEVERITY_WARNING );
|
||||||
++m_warningCount;
|
++m_warningCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -550,7 +550,7 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist )
|
||||||
msg.Printf( _( "Reconnect copper zone from %s to %s." ),
|
msg.Printf( _( "Reconnect copper zone from %s to %s." ),
|
||||||
UnescapeString( zone->GetNetname() ),
|
UnescapeString( zone->GetNetname() ),
|
||||||
UnescapeString( updatedNetname ) );
|
UnescapeString( updatedNetname ) );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
if( !m_isDryRun )
|
if( !m_isDryRun )
|
||||||
{
|
{
|
||||||
|
@ -570,7 +570,7 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Copper zone (%s) has no pads connected." ),
|
msg.Printf( _( "Copper zone (%s) has no pads connected." ),
|
||||||
UnescapeString( zone->GetNetname() ) );
|
UnescapeString( zone->GetNetname() ) );
|
||||||
m_reporter->Report( msg, SEVERITY_WARNING );
|
m_reporter->Report( msg, RPT_SEVERITY_WARNING );
|
||||||
++m_warningCount;
|
++m_warningCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -598,12 +598,12 @@ bool BOARD_NETLIST_UPDATER::deleteUnusedComponents( NETLIST& aNetlist )
|
||||||
if( module->IsLocked() )
|
if( module->IsLocked() )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Cannot remove unused footprint %s (locked)." ), module->GetReference() );
|
msg.Printf( _( "Cannot remove unused footprint %s (locked)." ), module->GetReference() );
|
||||||
m_reporter->Report( msg, SEVERITY_WARNING );
|
m_reporter->Report( msg, RPT_SEVERITY_WARNING );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg.Printf( _( "Remove unused footprint %s." ), module->GetReference() );
|
msg.Printf( _( "Remove unused footprint %s." ), module->GetReference() );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
if( !m_isDryRun )
|
if( !m_isDryRun )
|
||||||
m_commit.Remove( module );
|
m_commit.Remove( module );
|
||||||
|
@ -662,7 +662,7 @@ bool BOARD_NETLIST_UPDATER::deleteSinglePadNets()
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Remove single pad net %s." ),
|
msg.Printf( _( "Remove single pad net %s." ),
|
||||||
UnescapeString( getNetname( previouspad ) ) );
|
UnescapeString( getNetname( previouspad ) ) );
|
||||||
m_reporter->Report( msg, SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
if( !m_isDryRun )
|
if( !m_isDryRun )
|
||||||
previouspad->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
previouspad->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
||||||
|
@ -727,7 +727,7 @@ bool BOARD_NETLIST_UPDATER::testConnectivity( NETLIST& aNetlist )
|
||||||
component->GetReference(),
|
component->GetReference(),
|
||||||
padname,
|
padname,
|
||||||
footprint->GetFPID().Format().wx_str() );
|
footprint->GetFPID().Format().wx_str() );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
++m_errorCount;
|
++m_errorCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -765,7 +765,7 @@ bool BOARD_NETLIST_UPDATER::UpdateNetlist( NETLIST& aNetlist )
|
||||||
msg.Printf( _( "Processing component \"%s:%s\"." ),
|
msg.Printf( _( "Processing component \"%s:%s\"." ),
|
||||||
component->GetReference(),
|
component->GetReference(),
|
||||||
component->GetFPID().Format().wx_str() );
|
component->GetFPID().Format().wx_str() );
|
||||||
m_reporter->Report( msg, SEVERITY_INFO );
|
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||||
|
|
||||||
for( auto footprint : m_board->Modules() )
|
for( auto footprint : m_board->Modules() )
|
||||||
{
|
{
|
||||||
|
@ -816,7 +816,7 @@ bool BOARD_NETLIST_UPDATER::UpdateNetlist( NETLIST& aNetlist )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Multiple footprints found for \"%s\"." ),
|
msg.Printf( _( "Multiple footprints found for \"%s\"." ),
|
||||||
component->GetReference() );
|
component->GetReference() );
|
||||||
m_reporter->Report( msg, SEVERITY_ERROR );
|
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -850,20 +850,20 @@ bool BOARD_NETLIST_UPDATER::UpdateNetlist( NETLIST& aNetlist )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the ratsnest
|
// Update the ratsnest
|
||||||
m_reporter->ReportTail( wxT( "" ), SEVERITY_ACTION );
|
m_reporter->ReportTail( wxT( "" ), RPT_SEVERITY_ACTION );
|
||||||
m_reporter->ReportTail( wxT( "" ), SEVERITY_ACTION );
|
m_reporter->ReportTail( wxT( "" ), RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
msg.Printf( _( "Total warnings: %d, errors: %d." ), m_warningCount, m_errorCount );
|
msg.Printf( _( "Total warnings: %d, errors: %d." ), m_warningCount, m_errorCount );
|
||||||
m_reporter->ReportTail( msg, SEVERITY_ACTION );
|
m_reporter->ReportTail( msg, RPT_SEVERITY_ACTION );
|
||||||
|
|
||||||
if( m_errorCount )
|
if( m_errorCount )
|
||||||
{
|
{
|
||||||
m_reporter->ReportTail( _( "Errors occurred during the netlist update. Unless you fix them "
|
m_reporter->ReportTail( _( "Errors occurred during the netlist update. Unless you fix them "
|
||||||
"your board will not be consistent with the schematics." ),
|
"your board will not be consistent with the schematics." ),
|
||||||
SEVERITY_ERROR );
|
RPT_SEVERITY_ERROR );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_reporter->ReportTail( _( "Netlist update successful!" ), SEVERITY_ACTION );
|
m_reporter->ReportTail( _( "Netlist update successful!" ), RPT_SEVERITY_ACTION );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "No footprint defined for symbol \"%s\".\n" ),
|
msg.Printf( _( "No footprint defined for symbol \"%s\".\n" ),
|
||||||
component->GetReference() );
|
component->GetReference() );
|
||||||
aReporter.Report( msg, SEVERITY_ERROR );
|
aReporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter )
|
||||||
component->GetReference(),
|
component->GetReference(),
|
||||||
GetChars( fpOnBoard->GetFPID().Format() ),
|
GetChars( fpOnBoard->GetFPID().Format() ),
|
||||||
GetChars( component->GetFPID().Format() ) );
|
GetChars( component->GetFPID().Format() ) );
|
||||||
aReporter.Report( msg, SEVERITY_WARNING );
|
aReporter.Report( msg, RPT_SEVERITY_WARNING );
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter )
|
||||||
msg.Printf( _( "%s footprint ID \"%s\" is not valid." ),
|
msg.Printf( _( "%s footprint ID \"%s\" is not valid." ),
|
||||||
component->GetReference(),
|
component->GetReference(),
|
||||||
GetChars( component->GetFPID().Format() ) );
|
GetChars( component->GetFPID().Format() ) );
|
||||||
aReporter.Report( msg, SEVERITY_ERROR );
|
aReporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -221,7 +221,7 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter )
|
||||||
msg.Printf( _( "%s footprint \"%s\" not found in any libraries in the footprint library table.\n" ),
|
msg.Printf( _( "%s footprint \"%s\" not found in any libraries in the footprint library table.\n" ),
|
||||||
component->GetReference(),
|
component->GetReference(),
|
||||||
GetChars( component->GetFPID().GetLibItemName() ) );
|
GetChars( component->GetFPID().GetLibItemName() ) );
|
||||||
aReporter.Report( msg, SEVERITY_ERROR );
|
aReporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,10 +243,10 @@ static BOARD_DESIGN_SETTINGS GetOverlapCheckDesignSettings()
|
||||||
|
|
||||||
// do the overlap tests - that's a different test, but if not set,
|
// do the overlap tests - that's a different test, but if not set,
|
||||||
// the invalid courtyard checks don't run either
|
// the invalid courtyard checks don't run either
|
||||||
des_settings.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = SEVERITY_ERROR;
|
des_settings.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = RPT_SEVERITY_ERROR;
|
||||||
|
|
||||||
// we will also check for missing courtyards here
|
// we will also check for missing courtyards here
|
||||||
des_settings.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = SEVERITY_ERROR;
|
des_settings.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = RPT_SEVERITY_ERROR;
|
||||||
|
|
||||||
return des_settings;
|
return des_settings;
|
||||||
}
|
}
|
||||||
|
|
|
@ -448,10 +448,10 @@ static void CheckCollisionsMatchExpected( BOARD& aBoard,
|
||||||
static BOARD_DESIGN_SETTINGS GetOverlapCheckDesignSettings()
|
static BOARD_DESIGN_SETTINGS GetOverlapCheckDesignSettings()
|
||||||
{
|
{
|
||||||
BOARD_DESIGN_SETTINGS des_settings;
|
BOARD_DESIGN_SETTINGS des_settings;
|
||||||
des_settings.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = SEVERITY_ERROR;
|
des_settings.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = RPT_SEVERITY_ERROR;
|
||||||
|
|
||||||
// we might not always have courtyards - that's a separate test
|
// we might not always have courtyards - that's a separate test
|
||||||
des_settings.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = SEVERITY_IGNORE;
|
des_settings.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = RPT_SEVERITY_IGNORE;
|
||||||
|
|
||||||
return des_settings;
|
return des_settings;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,8 +159,8 @@ private:
|
||||||
BOARD_DESIGN_SETTINGS getDesignSettings() const override
|
BOARD_DESIGN_SETTINGS getDesignSettings() const override
|
||||||
{
|
{
|
||||||
BOARD_DESIGN_SETTINGS des_settings;
|
BOARD_DESIGN_SETTINGS des_settings;
|
||||||
des_settings.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = SEVERITY_IGNORE;
|
des_settings.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = RPT_SEVERITY_IGNORE;
|
||||||
des_settings.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = SEVERITY_ERROR;
|
des_settings.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = RPT_SEVERITY_ERROR;
|
||||||
|
|
||||||
return des_settings;
|
return des_settings;
|
||||||
}
|
}
|
||||||
|
@ -196,8 +196,8 @@ private:
|
||||||
BOARD_DESIGN_SETTINGS getDesignSettings() const override
|
BOARD_DESIGN_SETTINGS getDesignSettings() const override
|
||||||
{
|
{
|
||||||
BOARD_DESIGN_SETTINGS des_settings;
|
BOARD_DESIGN_SETTINGS des_settings;
|
||||||
des_settings.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = SEVERITY_ERROR;
|
des_settings.m_DRCSeverities[ DRCE_MISSING_COURTYARD_IN_FOOTPRINT ] = RPT_SEVERITY_ERROR;
|
||||||
des_settings.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = SEVERITY_IGNORE;
|
des_settings.m_DRCSeverities[ DRCE_OVERLAPPING_FOOTPRINTS ] = RPT_SEVERITY_IGNORE;
|
||||||
|
|
||||||
return des_settings;
|
return des_settings;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue