Properties: Special case PCB_SHAPE "Layer" property

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12304
This commit is contained in:
Roberto Fernandez Bautista 2022-08-29 23:13:30 +02:00
parent 2ff6a6aee1
commit 238c21ed0b
1 changed files with 5 additions and 0 deletions

View File

@ -320,5 +320,10 @@ static struct PCB_SHAPE_DESC
propMgr.AddTypeCast( new TYPE_CAST<PCB_SHAPE, EDA_SHAPE> );
propMgr.InheritsAfter( TYPE_HASH( PCB_SHAPE ), TYPE_HASH( BOARD_ITEM ) );
propMgr.InheritsAfter( TYPE_HASH( PCB_SHAPE ), TYPE_HASH( EDA_SHAPE ) );
auto layerProperty = new PROPERTY_ENUM<PCB_SHAPE, PCB_LAYER_ID, BOARD_ITEM>(
_HKI( "Layer" ), &PCB_SHAPE::SetLayer, &PCB_SHAPE::GetLayer );
propMgr.ReplaceProperty( TYPE_HASH( BOARD_ITEM ), _HKI( "Layer" ), layerProperty );
}
} _PCB_SHAPE_DESC;