pcb/gtk: buggy definition of LAYER_BUTTON_SILK
Bug #1500241 reported by
KaiMartin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pcb |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The constant LAYER_BUTTON_SILK is supposed to be the layer number just beyond the lase copper layer. Since the copper layers are enumerated starting at zero, this number is equal to the number of copper layers.
The definition in src/hid/gtk/gui.h says:
#define LAYER_BUTTON_SILK (MAX_LAYER + BOTTOM_SILK_LAYER)
This worked by coincidence because BOTTOM_SILK_LAYER is defined to be zero in src/const.h
The bug got exposed when I set BOTTOM_SILK_LAYER to 1. In this case pcb failed to compile because it iterates inconsistently over layer buttons.
The attached patch removes the contribution BOTTOM_SILK_LAYER.
---<)kaimartin(>---
Changed in geda-project: | |
importance: | Undecided → Low |
status: | New → In Progress |
tags: | added: gtk-gui |
Changed in geda-project: | |
status: | Fix Committed → Fix Released |
Changed in pcb: | |
status: | New → Fix Committed |
milestone: | none → next-bug-release |
Changed in pcb: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Good catch! Picked the commit from your Git branch to master.