Save footprint errors in the DRC log

Fixes https://gitlab.com/kicad/code/kicad/issues/3754
This commit is contained in:
brian piccioni 2020-01-15 10:26:13 -05:00 committed by Ian McInerney
parent fe15511d38
commit c7db77e664
1 changed files with 63 additions and 56 deletions

View File

@ -23,19 +23,19 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <base_units.h>
#include <bitmaps.h>
#include <collectors.h>
#include <confirm.h>
#include <dialog_drc.h>
#include <fctsys.h>
#include <kiface_i.h>
#include <confirm.h>
#include <wildcards_and_files_ext.h>
#include <bitmaps.h>
#include <pgm_base.h>
#include <dialog_drc.h>
#include <pcb_edit_frame.h>
#include <base_units.h>
#include <view/view.h>
#include <collectors.h>
#include <pgm_base.h>
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
#include <view/view.h>
#include <wildcards_and_files_ext.h>
/* class DIALOG_DRC_CONTROL: a dialog to set DRC parameters (clearance, min cooper size)
* and run DRC tests
@ -47,9 +47,9 @@
#define DrcTestFootprintsKey wxT( "DrcTestFootprints" )
DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, PCB_EDIT_FRAME* aEditorFrame,
wxWindow* aParent ) :
DIALOG_DRC_CONTROL_BASE( aParent ),
DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL(
DRC* aTester, PCB_EDIT_FRAME* aEditorFrame, wxWindow* aParent )
: DIALOG_DRC_CONTROL_BASE( aParent ),
m_trackMinWidth( aEditorFrame, m_TrackMinWidthTitle, m_SetTrackMinWidthCtrl,
m_TrackMinWidthUnit, true ),
m_viaMinSize( aEditorFrame, m_ViaMinTitle, m_SetViaMinSizeCtrl, m_ViaMinUnit, true ),
@ -571,8 +571,7 @@ bool DIALOG_DRC_CONTROL::writeReport( const wxString& aFullFileName )
int count;
EDA_UNITS units = GetUserUnits();
fprintf( fp, "** Drc report for %s **\n",
TO_UTF8( m_brdEditor->GetBoard()->GetFileName() ) );
fprintf( fp, "** Drc report for %s **\n", TO_UTF8( m_brdEditor->GetBoard()->GetFileName() ) );
wxDateTime now = wxDateTime::Now();
@ -592,6 +591,14 @@ bool DIALOG_DRC_CONTROL::writeReport( const wxString& aFullFileName )
for( int i = 0; i < count; ++i )
fprintf( fp, "%s", TO_UTF8( m_UnconnectedListBox->GetItem( i )->ShowReport( units ) ) );
count = m_FootprintsListBox->GetItemCount();
fprintf( fp, "\n** Found %d Footprint errors **\n", count );
for( int i = 0; i < count; ++i )
fprintf( fp, "%s", TO_UTF8( m_FootprintsListBox->GetItem( i )->ShowReport( units ) ) );
fprintf( fp, "\n** End of Report **\n" );
fclose( fp );