Backported edit point colour fix from master.

Fixes: lp:1846372
* https://bugs.launchpad.net/kicad/+bug/1846372
This commit is contained in:
Jeff Young 2019-10-31 23:35:02 +00:00
parent fb9b12a982
commit d4a8ff4872
1 changed files with 6 additions and 2 deletions

View File

@ -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 <maciej.suminski@cern.ch>
*
* This program is free software; you can redistribute it and/or
@ -23,6 +23,7 @@
*/
#include <gal/graphics_abstraction_layer.h>
#include <gal/color4d.h>
#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();