Transfer custom colours from board stackup to 3D viewer.

This commit is contained in:
Jeff Young 2021-08-16 20:01:41 +01:00
parent ca42f31bb5
commit 89d943a90c
1 changed files with 10 additions and 3 deletions

View File

@ -549,12 +549,19 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
auto findColor =
[]( const wxString& aColorName, const CUSTOM_COLORS_LIST& aColorSet )
{
if( aColorName.StartsWith( "#" ) )
{
return KIGFX::COLOR4D( wxColour( aColorName ) );
}
else
{
for( const CUSTOM_COLOR_ITEM& color : aColorSet )
{
if( color.m_ColorName == aColorName )
return color.m_Color;
}
}
return KIGFX::COLOR4D();
};