fix incorrect COLOR4D::COLOR4D( EDA_COLOR_T aColor ) ctor for UNDEFINED_COLOR
This commit is contained in:
parent
039910cb21
commit
04d1b2fca7
|
@ -32,6 +32,12 @@ using namespace KIGFX;
|
|||
|
||||
COLOR4D::COLOR4D( EDA_COLOR_T aColor )
|
||||
{
|
||||
if( aColor <= UNSPECIFIED_COLOR || aColor >= NBCOLORS )
|
||||
{
|
||||
*this = COLOR4D::UNSPECIFIED;
|
||||
return;
|
||||
}
|
||||
|
||||
r = g_ColorRefs[aColor].m_Red / 255.0;
|
||||
g = g_ColorRefs[aColor].m_Green / 255.0;
|
||||
b = g_ColorRefs[aColor].m_Blue / 255.0;
|
||||
|
|
Loading…
Reference in New Issue