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
This commit is contained in:
parent
8778599c0d
commit
89d3b0b670
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in New Issue