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:
Seth Hillbrand 2024-03-11 13:51:18 -07:00
parent d083593177
commit 9648fafe11
1 changed files with 5 additions and 2 deletions

View File

@ -873,7 +873,10 @@ static void memberOfSheetFunc( LIBEVAL::CONTEXT* aCtx, void* self )
result->SetDeferredEval(
[item, arg]() -> double
{
FOOTPRINT* fp = item->GetParentFootprint();
FOOTPRINT* fp = dyn_cast<FOOTPRINT*>( item );
if( !fp )
fp = item->GetParentFootprint();
if( !fp )
return 0.0;
@ -882,7 +885,7 @@ static void memberOfSheetFunc( LIBEVAL::CONTEXT* aCtx, void* self )
return 1.0;
if( ( arg->AsString().Matches( wxT( "/" ) ) || arg->AsString().IsEmpty() )
&& fp->GetSheetname().IsEmpty() )
&& fp->GetSheetname() == wxT( "Root" ) )
{
return 1.0;
}