From 5931a39c0f04fd407585589e5f9138971928ecd2 Mon Sep 17 00:00:00 2001 From: Barabas Raffai Date: Wed, 13 Jan 2021 01:22:30 +0000 Subject: [PATCH] Fix layer preset overwriting ratsnest settings Fixes https://gitlab.com/kicad/code/kicad/issues/6975 --- pcbnew/widgets/appearance_controls.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcbnew/widgets/appearance_controls.cpp b/pcbnew/widgets/appearance_controls.cpp index fd4182df57..439f3987f7 100644 --- a/pcbnew/widgets/appearance_controls.cpp +++ b/pcbnew/widgets/appearance_controls.cpp @@ -1133,6 +1133,13 @@ void APPEARANCE_CONTROLS::setVisibleObjects( GAL_SET aLayers ) } else { + // Ratsnest visibility is controlled by the ratsnest option, and not by the preset + if( m_frame->IsType( FRAME_PCB_EDITOR ) ) + { + PCB_DISPLAY_OPTIONS opt = m_frame->GetDisplayOptions(); + aLayers.set( LAYER_RATSNEST, opt.m_ShowGlobalRatsnest ); + } + m_frame->GetBoard()->SetVisibleElements( aLayers ); } }