diff --git a/3d-viewer/3d_canvas/board_adapter.cpp b/3d-viewer/3d_canvas/board_adapter.cpp index 112d9f6e45..bbe7212219 100644 --- a/3d-viewer/3d_canvas/board_adapter.cpp +++ b/3d-viewer/3d_canvas/board_adapter.cpp @@ -708,6 +708,8 @@ void BOARD_ADAPTER::SetLayerColors( const std::map& aColors ) for( const auto& [ layer, color ] : aColors ) settings->SetColor( layer, color ); + + Pgm().GetSettingsManager().SaveColorSettings( settings, "3d_viewer" ); } diff --git a/common/settings/color_settings.cpp b/common/settings/color_settings.cpp index a2cc245527..bb37d1fb15 100644 --- a/common/settings/color_settings.cpp +++ b/common/settings/color_settings.cpp @@ -36,7 +36,7 @@ const wxString COLOR_SETTINGS::COLOR_BUILTIN_CLASSIC = "_builtin_classic"; COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename, bool aAbsolutePath ) : - JSON_SETTINGS( std::move( aFilename ), SETTINGS_LOC::COLORS, colorsSchemaVersion ), + JSON_SETTINGS( aFilename, SETTINGS_LOC::COLORS, colorsSchemaVersion ), m_overrideSchItemColors( false ) { if( aAbsolutePath )