Add Keep Upright to properties inspector.

Fixes https://gitlab.com/kicad/code/kicad/issues/14421
This commit is contained in:
Jeff Young 2023-04-10 00:00:30 +01:00
parent d040690f60
commit adc213a04d
1 changed files with 7 additions and 0 deletions

View File

@ -531,6 +531,10 @@ static struct PCB_TEXT_DESC
&BOARD_ITEM::SetIsKnockout, &BOARD_ITEM::IsKnockout ), &BOARD_ITEM::SetIsKnockout, &BOARD_ITEM::IsKnockout ),
_HKI( "Text Properties" ) ); _HKI( "Text Properties" ) );
propMgr.AddProperty( new PROPERTY<PCB_TEXT, bool, EDA_TEXT>( _HKI( "Keep Upright" ),
&PCB_TEXT::SetKeepUpright, &PCB_TEXT::IsKeepUpright ),
_HKI( "Text Properties" ) );
auto isFootprintText = auto isFootprintText =
[]( INSPECTABLE* aItem ) -> bool []( INSPECTABLE* aItem ) -> bool
{ {
@ -543,6 +547,9 @@ static struct PCB_TEXT_DESC
propMgr.OverrideAvailability( TYPE_HASH( PCB_TEXT ), TYPE_HASH( EDA_TEXT ), propMgr.OverrideAvailability( TYPE_HASH( PCB_TEXT ), TYPE_HASH( EDA_TEXT ),
_HKI( "Visible" ), isFootprintText ); _HKI( "Visible" ), isFootprintText );
propMgr.OverrideAvailability( TYPE_HASH( PCB_TEXT ), TYPE_HASH( EDA_TEXT ),
_HKI( "Keep Upright" ), isFootprintText );
propMgr.OverrideAvailability( TYPE_HASH( PCB_TEXT ), TYPE_HASH( EDA_TEXT ), propMgr.OverrideAvailability( TYPE_HASH( PCB_TEXT ), TYPE_HASH( EDA_TEXT ),
_HKI( "Hyperlink" ), _HKI( "Hyperlink" ),
[]( INSPECTABLE* aItem ) { return false; } ); []( INSPECTABLE* aItem ) { return false; } );