DNP color doesn't respect custom color schemes
Description
When setting a custom color for the red "X" for "do not populate" components in schematics by changing the "ERC Errors" red, nothing happens.
When changing it in "KiCad Default" (AKA user.json), it changes color:
This color persists even when going back to the custom color scheme:
(which means that's a valid workaround for this issue)
The expected behavior is that changing the ERC Errors color in a custom color scheme takes effect.
My guess:
eeschema/sch_painter.cpp line 2335 or so
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
[...]
m_gal->SetStrokeColor( colors->GetColor( LAYER_ERC_ERR ) );
m_gal->SetFillColor( colors->GetColor( LAYER_ERC_ERR ) );
When calling GetColorSettings()
without arguments, the aName argument defaults to "user"
COLOR_SETTINGS* GetColorSettings( const wxString& aName = "user" );
Everything else seems to get the color through KIGFX::RENDER_SETTINGS::GetLayerColor
, from an already existing render settings instance passed by argument.
Steps to reproduce
- Open eeschema
- Add component with DNP
- Preferences -> schematic editor -> colors
- In the theme dropdown create a new theme
- Change ERC errors color to anything but red
KiCad Version
Also reproduced in 7.99.0.r1893.g3233bbe0-1
Application: KiCad Schematic Editor x86_64 on x86_64
Version: 7.0.5, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.13.1
HarfBuzz 7.3.0
FontConfig 2.14.2
libcurl/8.1.2 OpenSSL/3.1.1 zlib/1.2.13 brotli/1.0.9 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.11.0 nghttp2/1.54.0
Platform: Arch Linux, 64 bit, Little endian, wxGTK, , tty
Build Info:
Date: May 29 2023 21:15:26
wxWidgets: 3.2.2 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.81.0
OCC: 7.6.3
Curl: 8.1.1
ngspice: 40
Compiler: GCC 13.1.1 with C++ ABI 1018
Build settings:
KICAD_USE_EGL=ON
KICAD_SPICE=ON