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:
parent
4d899d7820
commit
a74d1d9962
|
@ -817,6 +817,9 @@ int PCB_CONTROL::Paste( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
clipBoard->SetElementVisibility( LAYER_RATSNEST,
|
||||||
|
board()->IsElementVisible( LAYER_RATSNEST ) );
|
||||||
|
|
||||||
if( pasteMode == PASTE_MODE::REMOVE_ANNOTATIONS )
|
if( pasteMode == PASTE_MODE::REMOVE_ANNOTATIONS )
|
||||||
{
|
{
|
||||||
for( FOOTPRINT* clipFootprint : clipBoard->Footprints() )
|
for( FOOTPRINT* clipFootprint : clipBoard->Footprints() )
|
||||||
|
@ -844,6 +847,10 @@ int PCB_CONTROL::Paste( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
for( PAD* pad : clipFootprint->Pads() )
|
||||||
|
pad->SetLocalRatsnestVisible( board()->IsElementVisible( LAYER_RATSNEST ) );
|
||||||
|
|
||||||
if( pasteMode == PASTE_MODE::REMOVE_ANNOTATIONS )
|
if( pasteMode == PASTE_MODE::REMOVE_ANNOTATIONS )
|
||||||
clipFootprint->SetReference( defaultRef );
|
clipFootprint->SetReference( defaultRef );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue