F_Cu | B_Cu is not the same as LSET( F_Cu ) | LSET( B_Cu),
so you cannot do some_lset |= F_Cu | B_Cu (or rather you can, but
it is not what you expect).
F_Cu and B_Cu are just ints, so 0 | 2 == 2. This isn't the
same as setting *bit indices* 0 and 2. OR-ing with 2 is setting
bit index 1, which is F_Mask.
You can set them one by one with lset.set( F_Cu ) or OR with
LSET::ExternalCuMask() helper. But actually, we're trying to set all 'n'
copper layers, and LSET has AllCuMask and we can save all the hassle
in this function.
Thanks to @aris-kimi for finding the problematic code lines and
providing the foundation of this fix.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19855
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
Also fixes a bug where the pretty printer didn't insert
linebreaks for a forest (it assumed a single tree root).
Also further regularises bool and quote formatting.
Like the DSNLEXER header, this has visibility in over 700
files, whereas well under half actually use any of it
(quite a bit, but not all, of it actually via DSNLEXER)
Many places already forward-declare the OUTPUTFORMATTER type,
by doing that for the others, it still possible to use the
non-IO methods without having to see richio.h.
The separates it from the LAYER_SELECTOR class - deciding
what color a layer is (say) is separate to managing the
actual selection of the layer. For example, sel_layer.cpp
only needs the presentation logic. This also makes it eaiser
to compose rather than inherit.
Additonally, break out the layer pair swatch function
to this class.
This will also be needed by the layer pair manager UI.
Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/15227
The dialog allows a color selection for each dielectric layer.
However for a "dielectric" defined by more than one layer, the color was handled
only for the first layer, and not for the other sub-layers.
Oh dear, there was a bunch going on here. Firstly the move from int
to long long int for ValueFromString() means that we were no longer
catching overflows (as we were C-style casting it back to int in many
places). But even when the overflow is caught, it would run in to
wxWidgets' empty string bug while trying to log it.
Fixes https://gitlab.com/kicad/code/kicad/issues/12577
This affects both the layer count dropdown and the "Adjust dielectric thickness" button. Changing layer widths will now maintain the same total board width and set layer widths to common manufacturer values. Layer widths can be locked (as before) to keep any manually defined values.