SCH_BASE_FRAME::FocusOnItem() fix incorrect calculation of a pin physical position.
Only ERC dialog was affected: when clicking on a error item, if the item is a pin the cursor was put far from the right location.
This commit is contained in:
parent
cb7263d017
commit
6e593aa1e0
|
@ -368,8 +368,9 @@ void SCH_BASE_FRAME::FocusOnItem( SCH_ITEM* aItem )
|
||||||
{
|
{
|
||||||
SCH_COMPONENT* comp = static_cast<SCH_COMPONENT*>( aItem->GetParent() );
|
SCH_COMPONENT* comp = static_cast<SCH_COMPONENT*>( aItem->GetParent() );
|
||||||
|
|
||||||
|
// for a pin, GetPosition() is relative to the symbol, not rotated, not mirrored
|
||||||
|
// calculate the physical position:
|
||||||
wxPoint delta;
|
wxPoint delta;
|
||||||
position -= comp->GetPosition();
|
|
||||||
delta = comp->GetTransform().TransformCoordinate( position );
|
delta = comp->GetTransform().TransformCoordinate( position );
|
||||||
position = delta + comp->GetPosition();
|
position = delta + comp->GetPosition();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue