From 74d47d8173f55f75d0534e5a02c74695f8e5d74b Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 15 Jan 2018 23:05:16 -0500 Subject: [PATCH] Ensure DrawRectangle() stroke outline will always be visible Fixes: lp:1743242 * https://bugs.launchpad.net/kicad/+bug/1743242 --- common/gal/opengl/opengl_gal.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 608c117144..9b46544466 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -688,6 +688,9 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn // Stroke the outline if( isStrokeEnabled ) { + // Ensure stroke will be visible at current zoom + lineWidth = std::max( lineWidth, ( 1.01 / worldScale ) ); + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); std::deque pointList;