FP_LIB_TABLE::ROW::SetType() ensures sensible value of "KiCad" if nothing good comes in.
This commit is contained in:
parent
e0a0f596e2
commit
a90975d11c
|
@ -42,6 +42,15 @@
|
||||||
using namespace FP_LIB_TABLE_T;
|
using namespace FP_LIB_TABLE_T;
|
||||||
|
|
||||||
|
|
||||||
|
void FP_LIB_TABLE::ROW::SetType( const wxString& aType )
|
||||||
|
{
|
||||||
|
type = IO_MGR::EnumFromStr( aType );
|
||||||
|
|
||||||
|
if( IO_MGR::PCB_FILE_T( -1 ) == type )
|
||||||
|
type = IO_MGR::KICAD;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FP_LIB_TABLE::FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable ) :
|
FP_LIB_TABLE::FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable ) :
|
||||||
fallBack( aFallBackTable )
|
fallBack( aFallBackTable )
|
||||||
{
|
{
|
||||||
|
@ -50,22 +59,6 @@ FP_LIB_TABLE::FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable ) :
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
void FP_LIB_TABLE::Paste( const FP_LIB_TABLE& aOther, int aDestNdx )
|
|
||||||
{
|
|
||||||
if( aDestNdx == -1 )
|
|
||||||
aDestNdx = rows.size() - 1;
|
|
||||||
else if( unsigned( aDestNdx ) >= rows.size() )
|
|
||||||
return; // bad caller.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
rows.assign( aOther.rows.begin(), aOther.rows.end() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
void FP_LIB_TABLE::Parse( FP_LIB_TABLE_LEXER* in ) throw( IO_ERROR, PARSE_ERROR )
|
void FP_LIB_TABLE::Parse( FP_LIB_TABLE_LEXER* in ) throw( IO_ERROR, PARSE_ERROR )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -181,7 +181,7 @@ public:
|
||||||
* Function SetType
|
* Function SetType
|
||||||
* changes the type represented by this row.
|
* changes the type represented by this row.
|
||||||
*/
|
*/
|
||||||
void SetType( const wxString& aType ) { type = IO_MGR::EnumFromStr( aType ); }
|
void SetType( const wxString& aType );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetFullURI
|
* Function GetFullURI
|
||||||
|
|
Loading…
Reference in New Issue