Just because we have a startItem doesn't mean it can find a width.
For instance, a pad with no other tracks attached will return 0. Fixes https://gitlab.com/kicad/code/kicad/issues/6019
This commit is contained in:
parent
23d9e2e74a
commit
827699bed2
|
@ -366,7 +366,8 @@ bool PNS_KICAD_IFACE_BASE::ImportSizes( PNS::SIZES_SETTINGS& aSizes, PNS::ITEM*
|
|||
{
|
||||
trackWidth = inheritTrackWidth( aStartItem );
|
||||
}
|
||||
else if( bds.UseNetClassTrack() && aStartItem ) // netclass value
|
||||
|
||||
if( trackWidth == 0 && bds.UseNetClassTrack() && aStartItem ) // netclass value
|
||||
{
|
||||
if( m_ruleResolver->QueryConstraint( PNS::CONSTRAINT_TYPE::CT_WIDTH, aStartItem, nullptr,
|
||||
aStartItem->Layer(), &constraint ) )
|
||||
|
@ -374,7 +375,8 @@ bool PNS_KICAD_IFACE_BASE::ImportSizes( PNS::SIZES_SETTINGS& aSizes, PNS::ITEM*
|
|||
trackWidth = constraint.m_Value.OptThenMin();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if( trackWidth == 0 )
|
||||
{
|
||||
trackWidth = bds.GetCurrentTrackWidth();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue