Pcbnew: minor cosmetic enhancement:in status panel, for polygon graphic shape:

shows the coordinates of the first polygon point (instead of 0,0 coordinates)
This commit is contained in:
jean-pierre charras 2019-12-18 13:15:59 +01:00
parent 3370e89967
commit a9f9540fa4
1 changed files with 20 additions and 7 deletions

View File

@ -503,14 +503,27 @@ void DRAWSEGMENT::GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector< MSG_PANEL_IT
}
}
wxString start = wxString::Format( "@(%s, %s)",
MessageTextFromValue( aUnits, GetStart().x ),
MessageTextFromValue( aUnits, GetStart().y ) );
wxString end = wxString::Format( "@(%s, %s)",
MessageTextFromValue( aUnits, GetEnd().x ),
MessageTextFromValue( aUnits, GetEnd().y ) );
if( m_Shape == S_POLYGON )
{
VECTOR2I point0 = GetPolyShape().Outline(0).CPoint(0);
wxString origin = wxString::Format( "@(%s, %s)",
MessageTextFromValue( aUnits, point0.x ),
MessageTextFromValue( aUnits, point0.y ) );
aList.emplace_back( _( "Origin" ), origin, DARKGREEN );
}
else
{
wxString start = wxString::Format( "@(%s, %s)",
MessageTextFromValue( aUnits, GetStart().x ),
MessageTextFromValue( aUnits, GetStart().y ) );
wxString end = wxString::Format( "@(%s, %s)",
MessageTextFromValue( aUnits, GetEnd().x ),
MessageTextFromValue( aUnits, GetEnd().y ) );
aList.emplace_back( start, end, DARKGREEN );
}
aList.emplace_back( start, end, DARKGREEN );
aList.emplace_back( _( "Layer" ), GetLayerName(), DARKBROWN );
msg = MessageTextFromValue( aUnits, m_Width, true );