Honour custom layer names for Layer_Top and Layer_Bottom.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15835
(cherry picked from commit da5f5536c8
)
This commit is contained in:
parent
2f8e846b9e
commit
1fdaa1083e
|
@ -129,7 +129,9 @@ LIBEVAL::VALUE* PCB_EXPR_VAR_REF::GetValue( LIBEVAL::CONTEXT* aCtx )
|
||||||
const wxAny& any = item->Get( it->second );
|
const wxAny& any = item->Get( it->second );
|
||||||
PCB_LAYER_ID layer;
|
PCB_LAYER_ID layer;
|
||||||
|
|
||||||
if( it->second->Name() == wxT( "Layer" ) )
|
if( it->second->Name() == wxT( "Layer" )
|
||||||
|
|| it->second->Name() == wxT( "Layer Top" )
|
||||||
|
|| it->second->Name() == wxT( "Layer Bottom" ) )
|
||||||
{
|
{
|
||||||
if( any.GetAs<PCB_LAYER_ID>( &layer ) )
|
if( any.GetAs<PCB_LAYER_ID>( &layer ) )
|
||||||
return new PCB_LAYER_VALUE( layer );
|
return new PCB_LAYER_VALUE( layer );
|
||||||
|
|
Loading…
Reference in New Issue