diff --git a/eeschema/tools/ee_point_editor.cpp b/eeschema/tools/ee_point_editor.cpp index 4855313cbb..3df446b6de 100644 --- a/eeschema/tools/ee_point_editor.cpp +++ b/eeschema/tools/ee_point_editor.cpp @@ -572,6 +572,10 @@ void EE_POINT_EDITOR::updateParentItem() const pinEditedCorner( getEditedPointIndex(), sheet->GetMinWidth(), sheet->GetMinHeight(), topLeft, topRight, botLeft, botRight, grid_size ); + // Pin positions are relative to origin. Attempt to leave them where they + // are if the origin moves. + wxPoint originDelta = sheet->GetPosition() - (wxPoint) topLeft; + sheet->SetPosition( (wxPoint) topLeft ); sheet->SetSize( wxSize( botRight.x - topLeft.x, botRight.y - topLeft.y ) ); @@ -584,6 +588,8 @@ void EE_POINT_EDITOR::updateParentItem() const { wxPoint pos = pin->GetPosition(); + pos += originDelta; + switch( pin->GetEdge() ) { case SHEET_LEFT_SIDE: pos.x = topLeft.x; break;