From bd7447cff3cd59d010d268bb030cefe918a83e1b Mon Sep 17 00:00:00 2001 From: Simon Richter Date: Mon, 18 Apr 2022 07:56:48 +0200 Subject: [PATCH] Fix variable name This is the top left position, not the top right. --- eeschema/tools/sch_move_tool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index bcadc9e0ce..259f43dfa7 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -1447,9 +1447,9 @@ int SCH_MOVE_TOOL::AlignElements( const TOOL_EVENT& aEvent ) else if( item->Type() == SCH_SHEET_T ) { SCH_SHEET* sheet = static_cast( item ); - VECTOR2I topRight = sheet->GetPosition(); - VECTOR2I bottomRight = topRight + sheet->GetSize(); - VECTOR2I tl_gridpt = grid.AlignGrid( topRight ) - topRight; + VECTOR2I topLeft = sheet->GetPosition(); + VECTOR2I bottomRight = topLeft + sheet->GetSize(); + VECTOR2I tl_gridpt = grid.AlignGrid( topLeft ) - topLeft; VECTOR2I br_gridpt = grid.AlignGrid( bottomRight ) - bottomRight; if( tl_gridpt != VECTOR2I( 0, 0 ) || br_gridpt != VECTOR2I( 0, 0 ) )