Fix compil and Coverity warnings.
This commit is contained in:
parent
e5d132beec
commit
cb3d215b6a
|
@ -29,12 +29,18 @@ class JOB_EXPORT_PCB_POS : public JOB
|
|||
{
|
||||
public:
|
||||
JOB_EXPORT_PCB_POS( bool aIsCli ) :
|
||||
JOB( "pos", aIsCli ), m_filename(),
|
||||
JOB( "pos", aIsCli ),
|
||||
m_filename(),
|
||||
m_outputFile(),
|
||||
m_excludeFootprintsWithTh( true ),
|
||||
m_useDrillPlaceFileOrigin( true ),
|
||||
m_smdOnly( false )
|
||||
m_smdOnly( false ),
|
||||
m_excludeFootprintsWithTh( false ),
|
||||
m_negateBottomX( false )
|
||||
{
|
||||
m_side = SIDE::BOTH;
|
||||
m_units = UNITS::MILLIMETERS;
|
||||
m_format = FORMAT::ASCII;
|
||||
m_gerberBoardEdge = true;
|
||||
}
|
||||
|
||||
wxString m_filename;
|
||||
|
|
|
@ -434,10 +434,9 @@ int PCBNEW_JOBS_HANDLER::JobExportPos( JOB* aJob )
|
|||
{
|
||||
PLACEFILE_GERBER_WRITER exporter( brd );
|
||||
|
||||
PCB_LAYER_ID gbrLayer;
|
||||
if( aPosJob->m_side == JOB_EXPORT_PCB_POS::SIDE::FRONT )
|
||||
gbrLayer = F_Cu;
|
||||
else if( aPosJob->m_side == JOB_EXPORT_PCB_POS::SIDE::BACK )
|
||||
PCB_LAYER_ID gbrLayer = F_Cu;
|
||||
|
||||
if( aPosJob->m_side == JOB_EXPORT_PCB_POS::SIDE::BACK )
|
||||
gbrLayer = B_Cu;
|
||||
|
||||
exporter.CreatePlaceFile( aPosJob->m_outputFile, gbrLayer, aPosJob->m_gerberBoardEdge );
|
||||
|
|
|
@ -2485,7 +2485,7 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
|
|||
if( !board()->IsLayerVisible( aItem->GetLayer() ) )
|
||||
return false;
|
||||
|
||||
int controlLayer;
|
||||
int controlLayer = UNDEFINED_LAYER;
|
||||
|
||||
switch( static_cast<const FP_TEXT*>( aItem )->GetType() )
|
||||
{
|
||||
|
@ -2494,6 +2494,9 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
|
|||
case FP_TEXT::TEXT_is_DIVERS: controlLayer = LAYER_MOD_TEXT; break;
|
||||
}
|
||||
|
||||
if( controlLayer == UNDEFINED_LAYER )
|
||||
return false;
|
||||
|
||||
if( !view()->IsLayerVisible( controlLayer ) )
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue