Properties: disable pad y-size when circular
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15038
(cherry picked from commit 39073642a7
)
This commit is contained in:
parent
033ab9ac71
commit
9ac5f837f7
|
@ -1825,7 +1825,16 @@ static struct PAD_DESC
|
|||
PROPERTY_DISPLAY::PT_SIZE ), groupPad );
|
||||
propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Size Y" ),
|
||||
&PAD::SetSizeY, &PAD::GetSizeY,
|
||||
PROPERTY_DISPLAY::PT_SIZE ), groupPad );
|
||||
PROPERTY_DISPLAY::PT_SIZE ), groupPad )
|
||||
.SetAvailableFunc(
|
||||
[=]( INSPECTABLE* aItem ) -> bool
|
||||
{
|
||||
// Circle pads have no usable y-size
|
||||
if( PAD* pad = dynamic_cast<PAD*>( aItem ) )
|
||||
return pad->GetShape() != PAD_SHAPE::CIRCLE;
|
||||
|
||||
return true;
|
||||
} );
|
||||
|
||||
auto roundRadiusRatio = new PROPERTY<PAD, double>( _HKI( "Round Radius Ratio" ),
|
||||
&PAD::SetRoundRectRadiusRatio, &PAD::GetRoundRectRadiusRatio );
|
||||
|
|
Loading…
Reference in New Issue