API: Include custom layer names in stackup

This commit is contained in:
Jon Evans
2025-01-07 18:28:07 -05:00
parent 19e5ca3430
commit bd47692bf2
2 changed files with 16 additions and 0 deletions
+12
View File
@@ -675,6 +675,18 @@ HANDLER_RESULT<BoardStackupResponse> API_HANDLER_PCB::handleGetStackup(
any.UnpackTo( response.mutable_stackup() );
// User-settable layer names are not stored in BOARD_STACKUP at the moment
for( board::BoardStackupLayer& layer : *response.mutable_stackup()->mutable_layers() )
{
if( layer.type() == board::BoardStackupLayerType::BSLT_DIELECTRIC )
continue;
PCB_LAYER_ID id = FromProtoEnum<PCB_LAYER_ID>( layer.layer() );
wxCHECK2( id != UNDEFINED_LAYER, continue );
layer.set_user_name( frame()->GetBoard()->GetLayerName( id ) );
}
return response;
}