diff --git a/include/footprint_info.h b/include/footprint_info.h index 4684e34092..e76a881fe5 100644 --- a/include/footprint_info.h +++ b/include/footprint_info.h @@ -23,7 +23,7 @@ public: int m_Num; ///< Order number in the display list. wxString m_Doc; ///< Footprint description. wxString m_KeyWord; ///< Footprint key words. - int m_padCount; ///< Number of pads + unsigned m_padCount; ///< Number of pads FOOTPRINT_INFO() { @@ -80,7 +80,7 @@ public: */ void AddItem( FOOTPRINT_INFO* aItem ) { - m_List.push_back( aItem); + m_List.push_back( aItem ); } /** diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index b664b636e6..d0464e0809 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -188,7 +188,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) else fpOnBoard = m_Pcb->FindModule( aNetlist.GetComponent( ii )->GetReference() ); - loadFootprint = (fpOnBoard != NULL) && + loadFootprint = (fpOnBoard == NULL) || (fpOnBoard->GetPath() != component->GetFootprintName()); if( loadFootprint && (component->GetFootprintName() != lastFootprintLibName) ) @@ -203,7 +203,17 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) libPath = wxGetApp().FindLibraryPath( fn ); if( !libPath ) + { + if( aReporter ) + { + msg.Printf( _( "*** Warning: Cannot find footprint library file \"%s\" " + "in any of the standard KiCad library search paths. ***\n" ), + GetChars( fn.GetFullPath() ) ); + aReporter->Report( msg ); + } + continue; + } module = pi->FootprintLoad( libPath, component->GetFootprintName() ); @@ -238,7 +248,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) module = new MODULE( *module ); } - wxASSERT( module != NULL ); - component->SetModule( module ); + if( loadFootprint && module != NULL ) + component->SetModule( module ); } } diff --git a/pcbnew/netlist_reader.cpp b/pcbnew/netlist_reader.cpp index 7a52e7e35a..8f127e2d2a 100644 --- a/pcbnew/netlist_reader.cpp +++ b/pcbnew/netlist_reader.cpp @@ -37,6 +37,7 @@ #include +#if defined(DEBUG) /** * Function NestedSpace * outputs nested space for pretty indenting. @@ -53,7 +54,6 @@ static REPORTER& NestedSpace( int aNestLevel, REPORTER& aReporter ) } -#if defined(DEBUG) void COMPONENT_NET::Show( int aNestLevel, REPORTER& aReporter ) { NestedSpace( aNestLevel, aReporter );