Handle memberOfSheet for full footprints
Previously, we handled clearance for just components in the eval function. We also checked the incorrect root sheetname.
This commit is contained in:
parent
d083593177
commit
9648fafe11
|
@ -873,7 +873,10 @@ static void memberOfSheetFunc( LIBEVAL::CONTEXT* aCtx, void* self )
|
||||||
result->SetDeferredEval(
|
result->SetDeferredEval(
|
||||||
[item, arg]() -> double
|
[item, arg]() -> double
|
||||||
{
|
{
|
||||||
FOOTPRINT* fp = item->GetParentFootprint();
|
FOOTPRINT* fp = dyn_cast<FOOTPRINT*>( item );
|
||||||
|
|
||||||
|
if( !fp )
|
||||||
|
fp = item->GetParentFootprint();
|
||||||
|
|
||||||
if( !fp )
|
if( !fp )
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
@ -882,7 +885,7 @@ static void memberOfSheetFunc( LIBEVAL::CONTEXT* aCtx, void* self )
|
||||||
return 1.0;
|
return 1.0;
|
||||||
|
|
||||||
if( ( arg->AsString().Matches( wxT( "/" ) ) || arg->AsString().IsEmpty() )
|
if( ( arg->AsString().Matches( wxT( "/" ) ) || arg->AsString().IsEmpty() )
|
||||||
&& fp->GetSheetname().IsEmpty() )
|
&& fp->GetSheetname() == wxT( "Root" ) )
|
||||||
{
|
{
|
||||||
return 1.0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue