From a74d1d9962a6d9099a0138502777687d504b0690 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 10 Jan 2022 12:47:18 -0800 Subject: [PATCH] Keep ratsnest setting when pasting Paste items should copy the global ratsnest visibility setting Fixes https://gitlab.com/kicad/code/kicad/issues/10346 --- pcbnew/tools/pcb_control.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index 18c77ae571..454e120796 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -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 );