From c8d897ed0f029c10a2e1cf9b7ed6a504c5bc6849 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 10 Mar 2024 21:09:51 +0000 Subject: [PATCH] Fix copy/pasta in GetLayerColors(). Fixes https://gitlab.com/kicad/code/kicad/-/issues/17374 --- 3d-viewer/3d_canvas/board_adapter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/3d-viewer/3d_canvas/board_adapter.cpp b/3d-viewer/3d_canvas/board_adapter.cpp index cf948be7c4..d84e713920 100644 --- a/3d-viewer/3d_canvas/board_adapter.cpp +++ b/3d-viewer/3d_canvas/board_adapter.cpp @@ -595,8 +595,10 @@ std::map BOARD_ADAPTER::GetLayerColors() const } else { - for( const auto& [ layer, color ] : GetDefaultColors() ) - colors[ layer ] = color; + COLOR_SETTINGS* settings = Pgm().GetSettingsManager().GetColorSettings(); + + for( const auto& [ layer, defaultColor /* unused */ ] : GetDefaultColors() ) + colors[ layer ] = settings->GetColor( layer ); } if( m_Cfg->m_UseStackupColors && m_board )