Fix some asserts with the property system
It seems like there may be some race between BOARD_CONNECTED_ITEM_DESC and BOARD_ITEM_DESC https://gitlab.com/kicad/code/kicad/-/issues/4816
This commit is contained in:
parent
98664ee714
commit
4e54b773e9
|
@ -204,6 +204,16 @@ static struct BOARD_CONNECTED_ITEM_DESC
|
||||||
{
|
{
|
||||||
BOARD_CONNECTED_ITEM_DESC()
|
BOARD_CONNECTED_ITEM_DESC()
|
||||||
{
|
{
|
||||||
|
auto& layerEnum = ENUM_MAP<PCB_LAYER_ID>::Instance();
|
||||||
|
|
||||||
|
if( layerEnum.Choices().GetCount() == 0 )
|
||||||
|
{
|
||||||
|
for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
|
||||||
|
{
|
||||||
|
layerEnum.Map( *seq, LSET::Name( *seq ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||||
REGISTER_TYPE( BOARD_CONNECTED_ITEM );
|
REGISTER_TYPE( BOARD_CONNECTED_ITEM );
|
||||||
propMgr.InheritsAfter( TYPE_HASH( BOARD_CONNECTED_ITEM ), TYPE_HASH( BOARD_ITEM ) );
|
propMgr.InheritsAfter( TYPE_HASH( BOARD_CONNECTED_ITEM ), TYPE_HASH( BOARD_ITEM ) );
|
||||||
|
|
|
@ -150,9 +150,12 @@ static struct BOARD_ITEM_DESC
|
||||||
{
|
{
|
||||||
auto& layerEnum = ENUM_MAP<PCB_LAYER_ID>::Instance();
|
auto& layerEnum = ENUM_MAP<PCB_LAYER_ID>::Instance();
|
||||||
|
|
||||||
for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
|
if( layerEnum.Choices().GetCount() == 0 )
|
||||||
{
|
{
|
||||||
layerEnum.Map( *seq, LSET::Name( *seq ) );
|
for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
|
||||||
|
{
|
||||||
|
layerEnum.Map( *seq, LSET::Name( *seq ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||||
|
|
|
@ -1211,7 +1211,7 @@ static struct PAD_DESC
|
||||||
.Map( PAD_SHAPE_TRAPEZOID, _( "Trapezoid" ) )
|
.Map( PAD_SHAPE_TRAPEZOID, _( "Trapezoid" ) )
|
||||||
.Map( PAD_SHAPE_ROUNDRECT, _( "Rounded Rectangle" ) )
|
.Map( PAD_SHAPE_ROUNDRECT, _( "Rounded Rectangle" ) )
|
||||||
.Map( PAD_SHAPE_CHAMFERED_RECT, _( "Chamfered Rectangle" ) )
|
.Map( PAD_SHAPE_CHAMFERED_RECT, _( "Chamfered Rectangle" ) )
|
||||||
.Map( PAD_SHAPE_CUSTOM, _( "Chamfered Rectangle" ) );
|
.Map( PAD_SHAPE_CUSTOM, _( "Custom" ) );
|
||||||
|
|
||||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||||
REGISTER_TYPE( D_PAD );
|
REGISTER_TYPE( D_PAD );
|
||||||
|
|
Loading…
Reference in New Issue