pcbnew: When changing color schemes, Some colors do not update to the correct theme and will change on click
Description
In 6.0.4 color schemes seem to have an issue where not everything will update properly to the actual color defined by the theme and will either match the last used theme, or a color that is not in the current or last theme (might be a mixture of the two but can't confirm myself). This was not experienced back on 6.0.0 and 6.0.2 as this is when I was developing my color scheme and all was fine then.
The below shows the silkscreen after me finding the issue, the displayed color matches neither of the two themes I switched between. But the trace is correct for the current theme.
After clicking the silk updates to the correct color for the current scheme, but only affects the clicked item. All other items still unchanged.
After changing theme, all silk updates to the correct color from the last theme. When clicked like before it updates to the current theme.
These pictures only show silk as it was the easiest to show, but I noticed on edge cuts and margin as well. Other items most likely are affected but I might have missed them changing or breaking. Also shown in the image is a trace which seems to correctly update to the current theme everytime.
EDIT: Also to add, I found this issue because I had previously changed the margin color but it was not updating on the PCB until I changed the theme. So this also affects changing colors in general.
EDIT 2: Also noticed the outline for copper pours will not update/match the traces. If you click them it will update to the current theme.
Steps to reproduce
- Open PCB
- Go to Preferences > Preferences > PCB Editor > Colors and select a different theme from the current one (one that would cause color changes) and hit OK
- Now some of the colors on screen will match the old theme, the current theme, and neither of the themes.
- Click on an item (be it silk, edge cut, margin, etc.) and it will change color back to the current theme.
- Do this again and the colors that were previously wrong will now update to the correct colors for the last theme while others will update to the current or change to a color in neither theme.
EDIT: If you press 'V' it will update the entire board to the current theme.
KiCad Version
Application: KiCad PCB Editor (64-bit)
Version: (6.0.4), release build
Libraries:
wxWidgets 3.1.5
libcurl/7.78.0-DEV Schannel zlib/1.2.11
Platform: Windows 10 (build 19043), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Mar 18 2022 03:04:44
wxWidgets: 3.1.5 (wchar_t,wx containers)
Boost: 1.76.0
OCC: 7.6.0
Curl: 7.78.0-DEV
ngspice: 36
Compiler: Visual C++ 1928 without C++ ABI
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON