From 89d3b0b67002f23cd7618543b90c8168513b4816 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 1 Feb 2021 00:33:00 +0000 Subject: [PATCH] Remove breakage of corner pinning in point editor. For some reason the post-pinned local variable references were replaced with calls to the points themselves (which are the pre-pinned values). Fixes https://gitlab.com/kicad/code/kicad/issues/7291 --- pcbnew/tools/pcb_point_editor.cpp | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pcbnew/tools/pcb_point_editor.cpp b/pcbnew/tools/pcb_point_editor.cpp index 8ca64a3e25..0075eb00b6 100644 --- a/pcbnew/tools/pcb_point_editor.cpp +++ b/pcbnew/tools/pcb_point_editor.cpp @@ -1222,17 +1222,17 @@ void PCB_POINT_EDITOR::updateItem() const if( isModified( m_editPoints->Point( RECT_TOP_LEFT ) ) || isModified( m_editPoints->Point( RECT_BOT_RIGHT ) ) ) { - dist[0] = center.x - m_editPoints->Point( RECT_TOP_LEFT ).GetPosition().x; - dist[1] = center.y - m_editPoints->Point( RECT_TOP_LEFT ).GetPosition().y; - dist[2] = m_editPoints->Point( RECT_BOT_RIGHT ).GetPosition().x - center.x; - dist[3] = m_editPoints->Point( RECT_BOT_RIGHT ).GetPosition().y - center.y; + dist[0] = center.x - topLeft.x; + dist[1] = center.y - topLeft.y; + dist[2] = botRight.x - center.x; + dist[3] = botRight.y - center.y; } else { - dist[0] = center.x - m_editPoints->Point( RECT_BOT_LEFT ).GetPosition().x; - dist[1] = center.y - m_editPoints->Point( RECT_TOP_RIGHT ).GetPosition().y; - dist[2] = m_editPoints->Point( RECT_TOP_RIGHT ).GetPosition().x - center.x; - dist[3] = m_editPoints->Point( RECT_BOT_LEFT ).GetPosition().y - center.y; + dist[0] = center.x - botLeft.x; + dist[1] = center.y - topRight.y; + dist[2] = topRight.x - center.x; + dist[3] = botLeft.y - center.y; } wxSize padSize( dist[0] + dist[2], dist[1] + dist[3] ); @@ -1255,17 +1255,17 @@ void PCB_POINT_EDITOR::updateItem() const if( isModified( m_editPoints->Point( RECT_TOP_LEFT ) ) || isModified( m_editPoints->Point( RECT_BOT_RIGHT ) ) ) { - left = m_editPoints->Point( RECT_TOP_LEFT ).GetPosition().x; - top = m_editPoints->Point( RECT_TOP_LEFT ).GetPosition().y; - right = m_editPoints->Point( RECT_BOT_RIGHT ).GetPosition().x; - bottom = m_editPoints->Point( RECT_BOT_RIGHT ).GetPosition().y; + left = topLeft.x; + top = topLeft.y; + right = botRight.x; + bottom = botRight.y; } else { - left = m_editPoints->Point( RECT_BOT_LEFT ).GetPosition().x; - top = m_editPoints->Point( RECT_TOP_RIGHT ).GetPosition().y; - right = m_editPoints->Point( RECT_TOP_RIGHT ).GetPosition().x; - bottom = m_editPoints->Point( RECT_BOT_LEFT ).GetPosition().y; + left = botLeft.x; + top = topRight.y; + right = topRight.x; + bottom = botLeft.y; } wxSize padSize( abs( right - left ), abs( bottom - top ) );