From d4a8ff4872146aa16bf20d84f389ae1c525e77c9 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 31 Oct 2019 23:35:02 +0000 Subject: [PATCH] Backported edit point colour fix from master. Fixes: lp:1846372 * https://bugs.launchpad.net/kicad/+bug/1846372 --- pcbnew/tools/edit_points.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/edit_points.cpp b/pcbnew/tools/edit_points.cpp index 56c5ad92d5..d10376f25f 100644 --- a/pcbnew/tools/edit_points.cpp +++ b/pcbnew/tools/edit_points.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KICAD, a free EDA CAD application. * - * Copyright (C) 2014-2017 CERN + * Copyright (C) 2014-2019 CERN * @author Maciej Suminski * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ */ #include +#include #include "edit_points.h" bool EDIT_POINT::WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const @@ -241,7 +242,10 @@ void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const { auto gal = aView->GetGAL(); - gal->SetFillColor( KIGFX::COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); + if( aView->GetGAL()->GetClearColor().GetBrightness() > 0.5 ) + gal->SetFillColor( KIGFX::COLOR4D( 0, 0, 0, 1.0 ) ); + else + gal->SetFillColor( KIGFX::COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); gal->SetIsFill( true ); gal->SetIsStroke( false ); gal->PushDepth();