232 Commits

Author SHA1 Message Date
John Beard
ed01324c1d Footprints: allow to set specific internal copper layers
Footprints can now have a custom stackup. This means that they specify
an exact number of copper layers and the layers map 1:1 to board layers.
If the board doesn't contain that layer, the element just doesn't
show. We could make this a DRC check later on.

If there is no stackup, the behavior is the current default: a rule area
the In1 layer "expands" to all Inner layers.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10838
2025-08-19 04:59:48 +08:00
Mark Roszko
53e8d051e3 Reuse the visibility bitmap bundles to reduce gdi object exhaustion
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21386#note_2654658071
2025-08-15 08:15:24 -04:00
Jeff Young
dc7312efd6 Frame needs an extra kick to toggle grid visibility.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21409
2025-08-04 21:19:21 +01:00
Jeff Young
fa7d67d80a Prevent stale selections. 2025-07-29 23:11:19 +01:00
Jeff Young
7a4107b985 Formatting. 2025-07-29 23:11:19 +01:00
Jeff Young
0128fb2eaf Formatting. 2025-07-29 23:11:19 +01:00
Jeff Young
51e244d7d4 Don't remove nonexistent entries from wxArrayStrings (KICAD-PG7) 2025-07-28 19:37:52 +01:00
Jeff Young
7b0aceb99e Prevent wxWidgets assert (KICAD-6VM). 2025-07-03 22:50:56 -06:00
jean-pierre charras
5d8c8b9c54 pcbnew, appearance control: add entry to enable/disable LAYER_BOARD_OUTLINE_AREA 2025-06-19 18:42:03 +02:00
Jeff Young
1bc60c32f0 Nullptr safety. 2025-06-15 21:45:09 +01:00
Jeff Young
18e107529a Don't force callers of GetAppSettings to implement exception processing. 2025-06-14 20:25:59 +01:00
Jeff Young
ecb5c5e0d4 Visibility control is for *filled* shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20635
2025-04-13 13:12:43 +01:00
Alex Shvartzkop
7a04389ac2 Improve pan performance when showing a large amount of TH pads.
See https://gitlab.com/kicad/code/kicad/-/issues/20506

(cherry picked from commit a1a710dfedec27514a089d2294e8ab516a1ce2d6)
2025-04-04 22:49:05 +03:00
Jeff Young
9a7b82a8c0 MOVED: fp editor layer names to Display Options.
(It was on Footprint Defaults, which didn't make
any sense.  Probably just ended up there because
there was similar code there.)

Also fixed a bug with accepting the dialog with
a grid cell editor open.

Also fixed a bug where the number of copper layers
would get set back to 2.

Also fixed a bug where the layer names weren't
getting updated in the Appearances tab.
2025-03-25 10:34:01 +00:00
Jeff Young
0a4533703c Performance. 2025-03-24 10:28:41 +00:00
dsa-t
d2edf6796c Fix scrollbars not appearing in Appearance layers panel after board import.
(cherry picked from commit f60313367ccc0a39459676de0456dda0ebd267e4)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-02-25 20:40:27 +00:00
Jeff Young
4e08afd517 Improve control spacing. 2025-02-19 23:43:53 +00:00
JamesJCode
e6cead5218 Fix incorrectly named bulk board update argument 2025-02-09 16:46:18 +00:00
Seth Hillbrand
6c2a559cbe Set base user layer count
Default colors cycle through repetition for unknown layers.  Allows
importing from complex Altium/CADSTAR boards with more than 10
documentation layers
2025-01-28 12:22:39 -08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
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
2025-01-01 14:12:04 -08:00
John Beard
f7aded00c7 Pcbnew: draw clearance lines on their own GAL layers
This tidies up quite a performance hit on layer change
caused by repainting vias, pads and tracks for their
clearances.

Instead, on a layer change, just disable any old clearance
layer and enable the new one (if any).

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19404
2024-12-31 00:53:10 +08:00
John Beard
858d28b13f Pcbnew: Update via/pad colour at the same time as tracks 2024-12-30 20:23:16 +08:00
John Beard
f9238f58f4 Pcbnew: rebuild layer preset list on language change
And initialise from the translations in the first place.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19181
2024-11-28 07:13:13 +08:00
Jon Evans
71a0a638a0 Remove unused pad layers and simplify pad colors 2024-11-16 11:27:20 -05:00
Mike Williams
867cb58175 feature removal: remove Show Hidden Text
Does not work properly since 8.0 introduction of footprint fields.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18656
2024-09-19 15:41:44 -04:00
Seth Hillbrand
5e0abadb23 Reorganize layer numbering
F_Cu = 0
B_Cu = 2
Remaining internal copper layers are even and incrementing

Non-copper layers are odd and incrementing.

This means that we can no longer do things like:
for( PCB_LAYER_ID layer = F_Cu; layer <= B_Cu; ++layer)
Instead, we have the class LAYER_RANGE:
for( PCB_LAYER_ID layer : LAYER_RANGE( F_Cu, B_Cu) )

Similarly, gt/lt tests should not refer to the integer value of the
layer.  We have functions such as IsCopperLayer to test whether a layer
is copper or not.

When using the connectivity RTree, the third dimension is layer, so we
provide B_Cu with the special INT_MAX value, ensuring that elements
between F_Cu and B_Cu will be identified.  There is a new, special
function GetBoardLayer() for interfacing with CN_ITEMS

Similarly, PNS layers remain unchanged and sequential.  A set of
interface functions is provided to map PNS layers to Board layers and
back.  This allows the PNS_LAYER_RANGE to function as expected
2024-09-06 23:07:58 +00:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
Seth Hillbrand
0c99f77158 Fix overzealous replace 2024-07-08 21:59:54 -07:00
Seth Hillbrand
293075426b Clean up some LSEQ functions
We are derived from std::vector now.  We don't need our own prima donna
increment and dereference overload as these just create bloat and
non-standard coding practices
2024-07-08 20:59:46 -07:00
Ian McInerney
c8ebcc8e0f Only modify visibility checkboxes for layers with them 2024-06-29 03:05:57 +01:00
Jon Evans
c70ef36739 ADDED: Opacity control for filled graphic shapes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18253
2024-06-26 22:29:58 -04:00
Jeff Young
30b5adde17 Fix spacing/scaling of indicators on MacOS.
Also pushes indicator scaling improvements to GerbView.
2024-05-26 14:37:05 +01:00
Alex Shvartzkop
0b4ff7b859 Improve indicator icons in hidpi monitors. 2024-05-26 01:16:47 +03:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Marek Roszko
dbd98f1ce0 Explicit lambda capture 2024-04-12 22:54:59 -04:00
JamesJ
951065390e Add composite update callback to BOARD_LISTENER
Required for net inspector otherwise composite operations (such
as undo / redo, and length tuning) can result in multiple add /
remove events firing which results in inconsistent length state.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17527
(for 9.0)
2024-04-04 22:29:47 +00:00
JamesJ
a763d613e5 Move Net Inspector dialog to a widget panel in pcbnew
Introduces some updates to the inspector, and a number of bug fixes:

- Correctly handles changes in board stackup
- Correctly handles unit change events
- Correctly handles language change events
- All layout / panel settings are stored to the project settings
- Retains ability to create net report
- Simple filter searches on net name and net class name (stored in settings)
- Allows hide / show of columns (stored in settings)
- Grouping by netclass (stored in settings)
- Optional filtering by net name (stored in settings)
- Optional filtering by net class (stored in settings)
- Custom grouping by net name match
2024-03-19 01:02:01 +00:00
Yon Uriarte
4e8e14ae3a Responsive: Avoid excessive repaints when toggling a netclass' rastnest visibility.
Toggling netclasses visibility toggles the member nets' visibility one by one. Defer redrawing until all toggling is done.

Fixes https://gitlab.com/kicad/code/kicad/issues/17115
2024-03-05 14:32:12 +00:00
Marek Roszko
0c8e08ed58 Move some language changes to a event on the frame 2024-03-03 11:02:26 -05:00
Jeff Young
c23550dc0b Unflip when going to viewport which isn't flipped.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13773
2024-02-29 17:37:48 +00:00
JamesJ
b8748c4ef8 Add import netclass color menu items to PCB appearance widget
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16908

ADDED: Context menu item in PCB appearances widget to import netclass
color from schematic.
ADDED: Context menu item to reset PCB netclass color (replicating
same menu item from Nets inspector)
2024-02-28 23:13:15 +00:00
Stefan
ed6f900b70 adding No Layers to apprearance manger presets, fix #15625 2024-02-24 15:44:26 +00:00
Jeff Young
9ff66d0e71 Don't capture references to local variables for CallAfter.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16934

(cherry picked from commit 9d40374baff216b5dbe18438d2948bc3915ebf0a)
2024-02-23 16:53:30 +01:00
Wayne Stambaugh
92c2ddf77a Do not parent dialogs to non top level windows in panels or widgets. 2024-02-03 10:40:28 -05:00
Marek Roszko
7c8ee26a38 FromDIP the pcb aui sizes 2024-01-17 22:02:05 -05:00
Wayne Stambaugh
b7dc7e90ac Minor string fixes. 2023-12-08 13:09:16 -05:00
Jon Evans
06a4bdbf4c Upgrade BITMAP_TOGGLE and GRID_BITMAP_TOGGLE to wxBitmapBundle 2023-10-22 14:02:06 -04:00
Jon Evans
eb5b3db063 Add bitmap bundle support to BITMAP_SCALE
Change a bunch of buttons and toolbars to use it

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14119
2023-10-22 14:02:06 -04:00
Marek Roszko
bee6e6be01 AddMenuLanguageList should live in EDA_BASE_FRAME, its only user 2023-10-16 19:49:52 -04:00
Marek Roszko
584757f2df Move the menu helpers to ui_common instead of sitting in bitmap for some reason 2023-10-16 19:40:46 -04:00