Eeschema: cross probing pin from a pad clicked in Pcbnew: fix incorrect pos of cursor.

A transform coordinate was applied twice, breaking the position of the graphic cursor.
Fixes #7414
https://gitlab.com/kicad/code/kicad/issues/7414
This commit is contained in:
jean-pierre charras 2021-02-04 17:24:06 +01:00
parent 7b9700d871
commit b48f29161e
1 changed files with 1 additions and 5 deletions

View File

@ -77,6 +77,7 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindComponentAndItem( const wxString& aReference,
if( pin )
{
// Get pin position in true schematic coordinate
pos = pin->GetPosition();
foundItem = pin;
break;
@ -106,11 +107,6 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindComponentAndItem( const wxString& aReference,
m_frame->DisplayCurrentSheet();
}
wxPoint delta;
pos -= component->GetPosition();
delta = component->GetTransform().TransformCoordinate( pos );
pos = delta + component->GetPosition();
if( crossProbingSettings.center_on_items )
{
m_frame->GetCanvas()->GetViewControls()->SetCrossHairCursorPosition( pos, false );