Only draw hidden pins if requested or in LibEdit.

Fixes: lp:1742485
* https://bugs.launchpad.net/kicad/+bug/1742485
This commit is contained in:
Jeff Young 2018-04-25 20:06:56 +01:00
parent 09a6bada03
commit ac778bc5b4
1 changed files with 10 additions and 6 deletions

View File

@ -592,17 +592,21 @@ void LIB_PIN::drawGraphic( EDA_DRAW_PANEL* aPanel,
// Invisible pins are only drawn on request.
// They are drawn in GetInvisibleItemColor().
// in schematic, they are drawn only if m_showAllPins is true.
// In other windows, they are always drawn because we must see them.
if( ! IsVisible() )
{
EDA_DRAW_FRAME* frame = NULL;
bool drawHidden = false;
if( aPanel && aPanel->GetParent() )
frame = (EDA_DRAW_FRAME*)aPanel->GetParent();
{
EDA_DRAW_FRAME* frame = aPanel->GetParent();
if( frame && frame->IsType( FRAME_SCH ) &&
! ((SCH_EDIT_FRAME*)frame)->GetShowAllPins() )
if( frame->IsType( FRAME_SCH ) )
drawHidden = dynamic_cast<SCH_EDIT_FRAME*>( frame )->GetShowAllPins();
else if( frame->IsType( FRAME_SCH_LIB_EDITOR ) )
drawHidden = true; // must be able to edit
}
if( !drawHidden )
{
if( drawPinDangling && drawDanglingHidden )
{