SCH_FIELDs are in parent's coord system.
Fixes https://gitlab.com/kicad/code/kicad/issues/12979
This commit is contained in:
parent
cd92088b7a
commit
651b3f1349
|
@ -1104,6 +1104,20 @@ void EE_SELECTION_TOOL::GuessSelectionCandidates( EE_COLLECTOR& collector, const
|
||||||
}
|
}
|
||||||
else if( text )
|
else if( text )
|
||||||
{
|
{
|
||||||
|
if( SCH_FIELD* field = dynamic_cast<SCH_FIELD*>( text ) )
|
||||||
|
{
|
||||||
|
if( field->GetParent() && field->GetParent()->Type() == SCH_SYMBOL_T )
|
||||||
|
{
|
||||||
|
symbol = static_cast<SCH_SYMBOL*>( field->GetParent() );
|
||||||
|
|
||||||
|
VECTOR2I relPos = pos - symbol->GetPosition();
|
||||||
|
relPos = symbol->GetTransform().InverseTransform().TransformCoordinate( relPos );
|
||||||
|
pos = relPos + symbol->GetPosition();
|
||||||
|
|
||||||
|
poss = SEG( pos, pos );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
text->GetEffectiveTextShape()->Collide( poss, closestDist, &dist );
|
text->GetEffectiveTextShape()->Collide( poss, closestDist, &dist );
|
||||||
}
|
}
|
||||||
else if( symbol )
|
else if( symbol )
|
||||||
|
|
Loading…
Reference in New Issue