pcb

pcb/gtk: buggy definition of LAYER_BUTTON_SILK

Bug #1500241 reported by KaiMartin
6
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(>---

Tags: gtk-gui pcb
Revision history for this message
KaiMartin (kmk-familieknaak) wrote :
tags: added: pcb
Traumflug (mah-jump-ing)
Changed in geda-project:
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Traumflug (mah-jump-ing) wrote :

Good catch! Picked the commit from your Git branch to master.

Changed in geda-project:
status: In Progress → Fix Committed
tags: added: gtk-gui
Traumflug (mah-jump-ing)
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.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.