Make sure imported graphics layer is visible.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16642

(partially cherry picked from commit 57315dd625)
This commit is contained in:
Jeff Young 2024-01-18 14:00:30 +00:00
parent 35364bd8ad
commit 51023a1ae4
1 changed files with 6 additions and 0 deletions

View File

@ -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