Track width not inherited correctly with multiple netclasses
Description
In the attached project (from user H4 on discord), routing from GND pads picks up the wrong track width. It takes the value from the default net class, even though the GND net is also part of the higher-priority GND netclass which defines a different track width. Clearance seems to work as expected.
If the "POWER" netclass is deleted, the correct track width is applied for the GND net. This is weird because:
- the GND net is not part of the POWER netclass
- the GND net is not getting the POWER netclass's track width applied
- POWER is lower priority than the GND netclass
This seems to be linux-specific somehow. The user reported this in 9.0.5-rc1 on linux, but does not see it on Windows. I see it on linux in master head and 9.0.5-rc1, but not 9.0.5-rc1 on mac.
This seems very similar to #21750 (closed), but I still see the issue in master after that fix.
Steps to reproduce
- Open attached project: FPGA_V3.zip
- Open pcbnew
- Start routing from a GND pad (I used pad 9 GND at bottom right of board)
- Track width is 2mm (from netclass "Default"), but should be 0.3mm (from netlcass "GND")
- Open board setup -> Net Classes
- Delete POWER net class
- Try routing GND again
- Track width is the correct 0.3mm
KiCad Version
Application: KiCad PCB Editor x86_64 on x86_64
Version: 9.99.0-3376-g593238eed8, release build
Libraries:
wxWidgets 3.2.8
FreeType 2.14.1
HarfBuzz 11.5.1
FontConfig 2.17.1
Platform: Arch Linux, 64 bit, Little endian, wxGTK, X11, KDE, x11
OpenGL: Intel, Mesa Intel(R) Iris(R) Plus Graphics 655 (CFL GT3), 4.6 (Compatibility Profile) Mesa 25.2.3-arch1.2
wxWidgets: 3.2.8 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.88.0
OCC: 7.9.1
Curl: 8.16.0
ngspice: 45
Compiler: GCC 15.2.1 with C++ ABI 1020
Build settings:
KICAD_USE_EGL=ON
KICAD_IPC_API=ON
KICAD_USE_PCH=OFF
Locale:
Lang: en_US
Enc: UTF-8
Num: 1,234.5
Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)
Edited by Graham Keeth

