Loading CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,7 @@ add_subdirectory(polygon) add_subdirectory(polygon/kbool/src) add_subdirectory(potrace) add_subdirectory(bitmap2component) add_subdirectory(pcb_calculator) #add_subdirectory(new) ############# Loading eeschema/backanno.cpp +39 −5 Original line number Diff line number Diff line Loading @@ -15,18 +15,25 @@ #include "general.h" #include "sch_sheet_path.h" #include "sch_component.h" #include "netlist.h" const wxString BackAnnotateFileWildcard( wxT( "EESchema Back Annotation File (*.stf)|*.stf" ) ); bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFilename, bool aSetFieldAttributeToVisible ) bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFile, bool aSetFieldAttributeToVisible ) { int LineNum = 0; char* cp, Ref[256], FootPrint[256], Line[1024]; SCH_SHEET_LIST SheetList; wxString reference; wxString footprint; while( GetLine( aFilename, Line, &LineNum, sizeof(Line) ) ) // Build a flat list of components in schematic: SCH_REFERENCE_LIST referencesList; SheetList.GetComponents( referencesList, false ); while( GetLine( aFile, Line, &LineNum, sizeof(Line) ) ) { if( sscanf( Line, "comp = \"%s module = \"%s", Ref, FootPrint ) == 2 ) { Loading @@ -38,12 +45,39 @@ bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFilename, bool aSetFieldAttributeT if( *cp == '"' ) *cp = 0; wxString reference = FROM_UTF8( Ref ); wxString Footprint = FROM_UTF8( FootPrint ); SheetList.SetComponentFootprint( reference, Footprint, aSetFieldAttributeToVisible ); reference = FROM_UTF8( Ref ); footprint = FROM_UTF8( FootPrint ); // Search the component in the flat list for( unsigned ii = 0; ii < referencesList.GetCount(); ii++ ) { if( reference.CmpNoCase( referencesList[ii].GetRef() ) == 0 ) { // We have found a candidate. // Note: it can be not unique (multiple parts per package) // So we do not stop the search here SCH_COMPONENT* component = referencesList[ii].GetComponent(); SCH_FIELD * fpfield = component->GetField( FOOTPRINT ); if( fpfield->m_Text.IsEmpty() && ( fpfield->m_Pos == wxPoint( 0, 0 ) ) ) { fpfield->m_Orient = component->GetField( VALUE )->m_Orient; fpfield->m_Pos = component->GetField( VALUE )->m_Pos; fpfield->m_Pos.y -= 100; } fpfield->m_Text = footprint; if( aSetFieldAttributeToVisible ) component->GetField( FOOTPRINT )->m_Attributs &= ~TEXT_NO_VISIBLE; else component->GetField( FOOTPRINT )->m_Attributs |= TEXT_NO_VISIBLE; } } } } fclose( aFile ); return true; } Loading eeschema/dialog_erc_listbox.h +4 −2 Original line number Diff line number Diff line Loading @@ -43,11 +43,13 @@ public: * Function AppendToList * @param aItem The SCH_MARKER* to add to the current list which will be * displayed in the wxHtmlListBox * @param aRefresh = true to refresh the display */ void AppendToList( SCH_MARKER* aItem ) void AppendToList( SCH_MARKER* aItem, bool aRefresh = true ) { m_MarkerList.push_back( aItem); SetItemCount( m_MarkerList.size() ); if( aRefresh ) Refresh(); } Loading eeschema/dialogs/dialog_erc.cpp +3 −9 Original line number Diff line number Diff line Loading @@ -325,17 +325,11 @@ void DIALOG_ERC::DisplayERC_MarkersList() SCH_MARKER* Marker = (SCH_MARKER*) DrawStruct; if( Marker->GetMarkerType() != MARK_ERC ) continue; /* Display diag */ // wxString msg; // msg.Printf( _( "<b>sheet %s</b><ul>\n" ), // Sheet->PathHumanReadable().GetData() ); // msg += Marker->GetReporter().ShowHtml(); // m_MarkersList->Append( msg ); m_MarkersList->AppendToList( Marker ); // Add marker without refresh the displayed list: m_MarkersList->AppendToList( Marker, false ); } } m_MarkersList->Refresh(); } Loading include/common.h +3 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ enum pseudokeys { #define EESCHEMA_EXE wxT( "eeschema.exe" ) #define GERBVIEW_EXE wxT( "gerbview.exe" ) #define BITMAPCONVERTER_EXE wxT( "bitmap2component.exe" ) #define PCB_CALCULATOR_EXE wxT( "pcb_calculator.exe" ) #else #ifndef __WXMAC__ #define CVPCB_EXE wxT( "cvpcb" ) Loading @@ -61,12 +62,14 @@ enum pseudokeys { #define EESCHEMA_EXE wxT( "eeschema" ) #define GERBVIEW_EXE wxT( "gerbview" ) #define BITMAPCONVERTER_EXE wxT( "bitmap2component" ) #define PCB_CALCULATOR_EXE wxT( "pcb_calculator" ) #else #define CVPCB_EXE wxT( "cvpcb.app/Contents/MacOS/cvpcb" ) #define PCBNEW_EXE wxT( "pcbnew.app/Contents/MacOS/pcbnew" ) #define EESCHEMA_EXE wxT( "eeschema.app/Contents/MacOS/eeschema" ) #define GERBVIEW_EXE wxT( "gerbview.app/Contents/MacOS/gerbview" ) #define BITMAPCONVERTER_EXE wxT( "bitmap2component.app/Contents/MacOS/bitmap2component" ) #define PCB_CALCULATOR_EXE wxT( "pcb_calculator.app/Contents/MacOS/pcb_calculator" ) # endif #endif Loading Loading
CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,7 @@ add_subdirectory(polygon) add_subdirectory(polygon/kbool/src) add_subdirectory(potrace) add_subdirectory(bitmap2component) add_subdirectory(pcb_calculator) #add_subdirectory(new) ############# Loading
eeschema/backanno.cpp +39 −5 Original line number Diff line number Diff line Loading @@ -15,18 +15,25 @@ #include "general.h" #include "sch_sheet_path.h" #include "sch_component.h" #include "netlist.h" const wxString BackAnnotateFileWildcard( wxT( "EESchema Back Annotation File (*.stf)|*.stf" ) ); bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFilename, bool aSetFieldAttributeToVisible ) bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFile, bool aSetFieldAttributeToVisible ) { int LineNum = 0; char* cp, Ref[256], FootPrint[256], Line[1024]; SCH_SHEET_LIST SheetList; wxString reference; wxString footprint; while( GetLine( aFilename, Line, &LineNum, sizeof(Line) ) ) // Build a flat list of components in schematic: SCH_REFERENCE_LIST referencesList; SheetList.GetComponents( referencesList, false ); while( GetLine( aFile, Line, &LineNum, sizeof(Line) ) ) { if( sscanf( Line, "comp = \"%s module = \"%s", Ref, FootPrint ) == 2 ) { Loading @@ -38,12 +45,39 @@ bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFilename, bool aSetFieldAttributeT if( *cp == '"' ) *cp = 0; wxString reference = FROM_UTF8( Ref ); wxString Footprint = FROM_UTF8( FootPrint ); SheetList.SetComponentFootprint( reference, Footprint, aSetFieldAttributeToVisible ); reference = FROM_UTF8( Ref ); footprint = FROM_UTF8( FootPrint ); // Search the component in the flat list for( unsigned ii = 0; ii < referencesList.GetCount(); ii++ ) { if( reference.CmpNoCase( referencesList[ii].GetRef() ) == 0 ) { // We have found a candidate. // Note: it can be not unique (multiple parts per package) // So we do not stop the search here SCH_COMPONENT* component = referencesList[ii].GetComponent(); SCH_FIELD * fpfield = component->GetField( FOOTPRINT ); if( fpfield->m_Text.IsEmpty() && ( fpfield->m_Pos == wxPoint( 0, 0 ) ) ) { fpfield->m_Orient = component->GetField( VALUE )->m_Orient; fpfield->m_Pos = component->GetField( VALUE )->m_Pos; fpfield->m_Pos.y -= 100; } fpfield->m_Text = footprint; if( aSetFieldAttributeToVisible ) component->GetField( FOOTPRINT )->m_Attributs &= ~TEXT_NO_VISIBLE; else component->GetField( FOOTPRINT )->m_Attributs |= TEXT_NO_VISIBLE; } } } } fclose( aFile ); return true; } Loading
eeschema/dialog_erc_listbox.h +4 −2 Original line number Diff line number Diff line Loading @@ -43,11 +43,13 @@ public: * Function AppendToList * @param aItem The SCH_MARKER* to add to the current list which will be * displayed in the wxHtmlListBox * @param aRefresh = true to refresh the display */ void AppendToList( SCH_MARKER* aItem ) void AppendToList( SCH_MARKER* aItem, bool aRefresh = true ) { m_MarkerList.push_back( aItem); SetItemCount( m_MarkerList.size() ); if( aRefresh ) Refresh(); } Loading
eeschema/dialogs/dialog_erc.cpp +3 −9 Original line number Diff line number Diff line Loading @@ -325,17 +325,11 @@ void DIALOG_ERC::DisplayERC_MarkersList() SCH_MARKER* Marker = (SCH_MARKER*) DrawStruct; if( Marker->GetMarkerType() != MARK_ERC ) continue; /* Display diag */ // wxString msg; // msg.Printf( _( "<b>sheet %s</b><ul>\n" ), // Sheet->PathHumanReadable().GetData() ); // msg += Marker->GetReporter().ShowHtml(); // m_MarkersList->Append( msg ); m_MarkersList->AppendToList( Marker ); // Add marker without refresh the displayed list: m_MarkersList->AppendToList( Marker, false ); } } m_MarkersList->Refresh(); } Loading
include/common.h +3 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ enum pseudokeys { #define EESCHEMA_EXE wxT( "eeschema.exe" ) #define GERBVIEW_EXE wxT( "gerbview.exe" ) #define BITMAPCONVERTER_EXE wxT( "bitmap2component.exe" ) #define PCB_CALCULATOR_EXE wxT( "pcb_calculator.exe" ) #else #ifndef __WXMAC__ #define CVPCB_EXE wxT( "cvpcb" ) Loading @@ -61,12 +62,14 @@ enum pseudokeys { #define EESCHEMA_EXE wxT( "eeschema" ) #define GERBVIEW_EXE wxT( "gerbview" ) #define BITMAPCONVERTER_EXE wxT( "bitmap2component" ) #define PCB_CALCULATOR_EXE wxT( "pcb_calculator" ) #else #define CVPCB_EXE wxT( "cvpcb.app/Contents/MacOS/cvpcb" ) #define PCBNEW_EXE wxT( "pcbnew.app/Contents/MacOS/pcbnew" ) #define EESCHEMA_EXE wxT( "eeschema.app/Contents/MacOS/eeschema" ) #define GERBVIEW_EXE wxT( "gerbview.app/Contents/MacOS/gerbview" ) #define BITMAPCONVERTER_EXE wxT( "bitmap2component.app/Contents/MacOS/bitmap2component" ) #define PCB_CALCULATOR_EXE wxT( "pcb_calculator.app/Contents/MacOS/pcb_calculator" ) # endif #endif Loading