7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 17:53:45 +00:00

Fix Courtyard layers disappeared

Currently, the used layers passed from parseLayers() do not include
mandatory layers if they are missing in the loaded board file.
To fix this, we can manually add the mandatory layers to ensure they
are always enabled.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18978
This commit is contained in:
Dhineshkumar S 2024-10-28 17:09:24 +00:00 committed by Seth Hillbrand
parent 45b68a5059
commit 6e2ed5666d

View File

@ -1432,8 +1432,11 @@ void BOARD_DESIGN_SETTINGS::SetCopperLayerCount( int aNewLayerCount )
void BOARD_DESIGN_SETTINGS::SetEnabledLayers( LSET aMask )
{
// Back and front layers are always enabled.
aMask.set( B_Cu ).set( F_Cu );
// Ensures mandatory back and front layers are always enabled
// regardless of board file configuration.
aMask.set( B_Cu ).set( F_Cu )
.set( B_CrtYd ).set( F_CrtYd )
.set( Edge_Cuts ).set( Margin );
m_enabledLayers = aMask;