Fix display of pads in high contrast mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6912
This commit is contained in:
parent
8b849b1c49
commit
7e58f1aa9f
|
@ -977,7 +977,7 @@ void PCB_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer )
|
|||
GetCanvas()->SetFocus(); // allow capture of hotkeys
|
||||
GetCanvas()->SetHighContrastLayer( aLayer );
|
||||
|
||||
// Vias on a restricted layer set must be redrawn when the active layer is changed
|
||||
// Pads and vias on a restricted layer set must be redrawn when the active layer is changed
|
||||
GetCanvas()->GetView()->UpdateAllItemsConditionally( KIGFX::REPAINT,
|
||||
[]( KIGFX::VIEW_ITEM* aItem ) -> bool
|
||||
{
|
||||
|
@ -986,6 +986,12 @@ void PCB_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer )
|
|||
return ( via->GetViaType() == VIATYPE::BLIND_BURIED ||
|
||||
via->GetViaType() == VIATYPE::MICROVIA );
|
||||
}
|
||||
else if( PAD* pad = dynamic_cast<PAD*>( aItem ) )
|
||||
{
|
||||
// TODO: this could be optimized if the pad painter is changed
|
||||
// See https://gitlab.com/kicad/code/kicad/-/issues/6912
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
|
|
@ -936,6 +936,12 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer )
|
|||
draw_annular = true;
|
||||
break;
|
||||
}
|
||||
else if( !IsCopperLayer( layer ) )
|
||||
{
|
||||
// If a non-copper layer is the high-contrast layer, just show the pad
|
||||
draw_annular = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue