From e95b2872f6633821982b2fcbaa7656d2ed85346a Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 25 Aug 2018 21:59:21 +1000 Subject: [PATCH] Add x/y dimensions to PCB ruler - Display dx and dy in addition to euclidian distance and angle --- common/preview_items/ruler_item.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/preview_items/ruler_item.cpp b/common/preview_items/ruler_item.cpp index 2442a17c16..21c24da43b 100644 --- a/common/preview_items/ruler_item.cpp +++ b/common/preview_items/ruler_item.cpp @@ -45,6 +45,9 @@ static void drawCursorStrings( KIGFX::VIEW* aView, const VECTOR2D& aCursor, // draw the cursor labels std::vector cursorStrings; + cursorStrings.push_back( DimensionLabel( "x", aRulerVec.x, aUnits ) ); + cursorStrings.push_back( DimensionLabel( "y", aRulerVec.y, aUnits ) ); + cursorStrings.push_back( DimensionLabel( "r", aRulerVec.EuclideanNorm(), aUnits ) ); double degs = RAD2DECIDEG( -aRulerVec.Angle() );