Allow pads with holes to be selected when hole is visible.
This commit is contained in:
parent
d261fa3792
commit
90519c8324
|
@ -1705,15 +1705,15 @@ void PCB_PAINTER::draw( const PCB_MARKER* aMarker, int aLayer )
|
||||||
|
|
||||||
// Don't paint shadows for invisible markers.
|
// Don't paint shadows for invisible markers.
|
||||||
// It would be nice to do this through layer dependencies but we can't do an "or" there today
|
// It would be nice to do this through layer dependencies but we can't do an "or" there today
|
||||||
if( isShadow && aMarker->GetBoard() &&
|
if( isShadow && aMarker->GetBoard()
|
||||||
!aMarker->GetBoard()->IsElementVisible( aMarker->GetColorLayer() ) )
|
&& !aMarker->GetBoard()->IsElementVisible( aMarker->GetColorLayer() ) )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SHAPE_LINE_CHAIN polygon;
|
SHAPE_LINE_CHAIN polygon;
|
||||||
aMarker->ShapeToPolygon( polygon );
|
aMarker->ShapeToPolygon( polygon );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
COLOR4D color = m_pcbSettings.GetColor( aMarker, isShadow ? LAYER_MARKER_SHADOWS
|
COLOR4D color = m_pcbSettings.GetColor( aMarker, isShadow ? LAYER_MARKER_SHADOWS
|
||||||
: aMarker->GetColorLayer() );
|
: aMarker->GetColorLayer() );
|
||||||
|
|
||||||
|
|
|
@ -2014,30 +2014,31 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aItem->Type() == PCB_PAD_T )
|
|
||||||
{
|
|
||||||
const PAD* pad = static_cast<const PAD*>( aItem );
|
const PAD* pad = static_cast<const PAD*>( aItem );
|
||||||
|
|
||||||
// Check render mode (from the Items tab) first
|
|
||||||
switch( pad->GetAttribute() )
|
switch( pad->GetAttribute() )
|
||||||
{
|
{
|
||||||
case PAD_ATTRIB_PTH:
|
case PAD_ATTRIB_PTH:
|
||||||
case PAD_ATTRIB_NPTH:
|
case PAD_ATTRIB_NPTH:
|
||||||
|
// Check render mode (from the Items tab) first
|
||||||
if( !board()->IsElementVisible( LAYER_PADS_TH ) )
|
if( !board()->IsElementVisible( LAYER_PADS_TH ) )
|
||||||
return false;
|
return false;
|
||||||
|
else
|
||||||
|
return ( pad->GetLayerSet() & LSET::PhysicalLayersMask() ).any();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PAD_ATTRIB_CONN:
|
case PAD_ATTRIB_CONN:
|
||||||
case PAD_ATTRIB_SMD:
|
case PAD_ATTRIB_SMD:
|
||||||
|
// Check render mode (from the Items tab) first
|
||||||
if( pad->IsOnLayer( F_Cu ) && !board()->IsElementVisible( LAYER_PAD_FR ) )
|
if( pad->IsOnLayer( F_Cu ) && !board()->IsElementVisible( LAYER_PAD_FR ) )
|
||||||
return false;
|
return false;
|
||||||
else if( pad->IsOnLayer( B_Cu ) && !board()->IsElementVisible( LAYER_PAD_BK ) )
|
else if( pad->IsOnLayer( B_Cu ) && !board()->IsElementVisible( LAYER_PAD_BK ) )
|
||||||
return false;
|
return false;
|
||||||
break;
|
else
|
||||||
}
|
|
||||||
|
|
||||||
// Otherwise, pads are selectable if any draw layer is visible
|
|
||||||
return ( pad->GetLayerSet() & board()->GetVisibleLayers() ).any();
|
return ( pad->GetLayerSet() & board()->GetVisibleLayers() ).any();
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue