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

@ -550,10 +550,17 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
auto findColor =
[]( const wxString& aColorName, const CUSTOM_COLORS_LIST& aColorSet )
{
for( const CUSTOM_COLOR_ITEM& color : aColorSet )
if( aColorName.StartsWith( "#" ) )
{
if( color.m_ColorName == aColorName )
return color.m_Color;
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();