7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Fix incorrect warning coordinates when updating board from schematic.

Use the X and Y axis inversion preference settings in the "PCB Editor"
"Origin & Axes" panel to invert the internal coordinates to display to
the user.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18662
This commit is contained in:
Wayne Stambaugh 2024-09-11 12:03:48 -04:00
parent ebbb12f6be
commit 64d4dbb2e8

View File

@ -1061,6 +1061,15 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist )
PCB_LAYER_ID layer = zone->GetLayer();
VECTOR2I pos = zone->GetPosition();
if( m_frame && m_frame->GetPcbNewSettings() )
{
if( m_frame->GetPcbNewSettings()->m_Display.m_DisplayInvertXAxis )
pos.x *= -1;
if( m_frame->GetPcbNewSettings()->m_Display.m_DisplayInvertYAxis )
pos.y *= -1;
}
msg.Printf( _( "Copper zone on layer %s at (%s, %s) has no pads connected." ),
m_board->GetLayerName( layer ),
m_frame->MessageTextFromValue( pos.x ),