From fa200f3d39bac5000b0dc9acc1394c7854718d52 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 17 Dec 2019 08:40:44 +0100 Subject: [PATCH] Pcbnew: enhancement: graphic polygon: display the points count, instead of length. Previously, the meaningless length (always 0) was displayed. --- pcbnew/class_drawsegment.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 471ee2180e..bcc7aa61e7 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -481,6 +481,13 @@ void DRAWSEGMENT::GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector< MSG_PANEL_IT aList.emplace_back( _( "Length" ), msg, DARKGREEN ); break; + case S_POLYGON: + aList.emplace_back( shape, _( "Polygon" ), RED ); + + msg.Printf( "%d", GetPolyShape().Outline(0).PointCount() ); + aList.emplace_back( _( "Points" ), msg, DARKGREEN ); + break; + default: { aList.emplace_back( shape, _( "Segment" ), RED );