From 51023a1ae45782b9d11c01c4600afffa34da11fb Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 18 Jan 2024 14:00:30 +0000 Subject: [PATCH] Make sure imported graphics layer is visible. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16642 (partially cherry picked from commit 57315dd6253c43bc58b9d06b550939d7feb94d3a) --- pcbnew/tools/drawing_tool.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index b6cd275aac..7b2ec3e546 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -1604,6 +1604,12 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent ) layer = newItems.front()->GetLayer(); + if( !m_view->IsLayerVisible( layer ) ) + { + m_frame->GetAppearancePanel()->SetLayerVisible( layer, true ); + m_frame->GetCanvas()->Refresh(); + } + m_view->Add( &preview ); // Clear the current selection then select the drawings so that edit tools work on them