Pcbnew bug and warning fixes.
* Fixed a bug in PCB_EDIT_FRAME::loadFootprints when no footprint libraries are found when attempting to load footprints. * Add a warning to PCB_EDIT_FRAME::loadFootprints to inform the user when a footprint library file cannot be found in any of the standard library search paths. * Changed FOOTPRINT_INFO::m_padCount to unsigned to prevent signed/unsigned comparison compiler warnings. * Put NestedSpace() function in netlist_reader.cpp inside conditional debug build statement to prevent warning in release builds.
This commit is contained in:
parent
f92cfcaee6
commit
218fb338ab
|
@ -23,7 +23,7 @@ public:
|
||||||
int m_Num; ///< Order number in the display list.
|
int m_Num; ///< Order number in the display list.
|
||||||
wxString m_Doc; ///< Footprint description.
|
wxString m_Doc; ///< Footprint description.
|
||||||
wxString m_KeyWord; ///< Footprint key words.
|
wxString m_KeyWord; ///< Footprint key words.
|
||||||
int m_padCount; ///< Number of pads
|
unsigned m_padCount; ///< Number of pads
|
||||||
|
|
||||||
FOOTPRINT_INFO()
|
FOOTPRINT_INFO()
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void AddItem( FOOTPRINT_INFO* aItem )
|
void AddItem( FOOTPRINT_INFO* aItem )
|
||||||
{
|
{
|
||||||
m_List.push_back( aItem);
|
m_List.push_back( aItem );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -188,7 +188,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
|
||||||
else
|
else
|
||||||
fpOnBoard = m_Pcb->FindModule( aNetlist.GetComponent( ii )->GetReference() );
|
fpOnBoard = m_Pcb->FindModule( aNetlist.GetComponent( ii )->GetReference() );
|
||||||
|
|
||||||
loadFootprint = (fpOnBoard != NULL) &&
|
loadFootprint = (fpOnBoard == NULL) ||
|
||||||
(fpOnBoard->GetPath() != component->GetFootprintName());
|
(fpOnBoard->GetPath() != component->GetFootprintName());
|
||||||
|
|
||||||
if( loadFootprint && (component->GetFootprintName() != lastFootprintLibName) )
|
if( loadFootprint && (component->GetFootprintName() != lastFootprintLibName) )
|
||||||
|
@ -203,7 +203,17 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
|
||||||
libPath = wxGetApp().FindLibraryPath( fn );
|
libPath = wxGetApp().FindLibraryPath( fn );
|
||||||
|
|
||||||
if( !libPath )
|
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;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
module = pi->FootprintLoad( libPath, component->GetFootprintName() );
|
module = pi->FootprintLoad( libPath, component->GetFootprintName() );
|
||||||
|
|
||||||
|
@ -238,7 +248,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
|
||||||
module = new MODULE( *module );
|
module = new MODULE( *module );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxASSERT( module != NULL );
|
if( loadFootprint && module != NULL )
|
||||||
component->SetModule( module );
|
component->SetModule( module );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include <wx/regex.h>
|
#include <wx/regex.h>
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(DEBUG)
|
||||||
/**
|
/**
|
||||||
* Function NestedSpace
|
* Function NestedSpace
|
||||||
* outputs nested space for pretty indenting.
|
* 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 )
|
void COMPONENT_NET::Show( int aNestLevel, REPORTER& aReporter )
|
||||||
{
|
{
|
||||||
NestedSpace( aNestLevel, aReporter );
|
NestedSpace( aNestLevel, aReporter );
|
||||||
|
|
Loading…
Reference in New Issue