Keep ratsnest setting when pasting

Paste items should copy the global ratsnest visibility setting

Fixes https://gitlab.com/kicad/code/kicad/issues/10346
This commit is contained in:
Seth Hillbrand 2022-01-10 12:47:18 -08:00
parent 4d899d7820
commit a74d1d9962
1 changed files with 7 additions and 0 deletions

View File

@ -817,6 +817,9 @@ int PCB_CONTROL::Paste( const TOOL_EVENT& aEvent )
}
else
{
clipBoard->SetElementVisibility( LAYER_RATSNEST,
board()->IsElementVisible( LAYER_RATSNEST ) );
if( pasteMode == PASTE_MODE::REMOVE_ANNOTATIONS )
{
for( FOOTPRINT* clipFootprint : clipBoard->Footprints() )
@ -844,6 +847,10 @@ int PCB_CONTROL::Paste( const TOOL_EVENT& aEvent )
}
else
{
for( PAD* pad : clipFootprint->Pads() )
pad->SetLocalRatsnestVisible( board()->IsElementVisible( LAYER_RATSNEST ) );
if( pasteMode == PASTE_MODE::REMOVE_ANNOTATIONS )
clipFootprint->SetReference( defaultRef );