212 Commits

Author SHA1 Message Date
JamesJCode
c80a71f64a Make netclass name methods clearer, and improve doc strings
There are two netclass name methods, which previously were not
obvious in their uses. These have been renamed to now have:

GetName() : Used for internal or tooling (e.g. netlist export) usage
GetHumanReadableName() : Used for display to users (e.g. in infobars)

Fixing the previous unclear naming will result in fewer bugs
when users start using the multiple netclass functionality, as
the incorrect usage had started creeping in to new code. Also this
will help authors of new code select the correct name method.
2025-01-14 20:44:09 +00:00
John Beard
4765d17d0c Show UUIDs in msg panel with an advanced config
This is useful when confirming matches for items in the
debugger or from a file without having to carefully check
individual parameters.
2025-01-07 20:01:44 +08:00
John Beard
d072b37dd9 Pcbnew: only get shape lengths for shapes that support it
Avoids asserts when selecting graphical rectangles, circles and
polygons.
2025-01-07 15:45:13 +08:00
Alex Shvartzkop
7afa6a086e Show "Selected 2D Length" for tracks and shapes in message panel.
Useful to verify length-matching.

Also show Length for arc shapes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19339
2025-01-06 18:45:28 +05: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
Ian McInerney
d5c5050d29 Fix initialization order of the events in pcbnew
The TOOL_EVENT constructor searches for ACTONS::cancelInteractive. That
action is global, so we need to ensure it is created before we try to
create these events - so switch to a create on first use paradigm for
the events.
2024-12-31 00:18:10 +00:00
JamesJCode
dfe0d6345b Another go at supressing FOOTPRINT field on FOOTPRINT objects 2024-12-28 21:57:35 +00:00
Marek Roszko
22d13546fb Some DisplayError -> DisplayErrorMessage 2024-12-20 19:28:30 -05:00
Jeff Young
8246637d69 Make sure descendants get new UUIDs when pasting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19052
2024-11-25 19:10:13 +00:00
Jeff Young
dc7fd828f9 Limit fix to MacOS.
GTK definitely doesn't need it.  It's unlikely that
MSW needs it either.
2024-10-20 11:57:11 +01:00
Jeff Young
f1ff75f969 Make sure Paste can't leak through modal dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18912
2024-10-17 10:01:42 +01:00
John Beard
c799966774 Handle pasting of image data from the clipboard
Also move some clipboard functions out of TOOL_MANAGER,
as they had no dependency on that class, and are just free
functions around wxTheClipboard.
2024-10-13 20:47:45 +08:00
John Beard
a367073f20 Pcbnew: handle pasting of raw text
Create a PCB_TEXT and put the text in there.

This mirrors what happens in eeschema.
2024-10-13 20:47:45 +08:00
jean-pierre charras
ef3193fe97 Pcbnew: fix some switch copper layers issues:
- fix PCB_CONTROL::LayerNext() and PCB_CONTROL::LayerPrev() (hotkeys + and -)
- fix PCB_EDIT_FRAME::SwitchLayer( PCB_LAYER_ID layer )
- fix PCB_BASE_FRAME::SwitchLayer( PCB_LAYER_ID layer )

-PNS router SwitchLayer is still broken and can crash.
2024-10-03 18:28:09 +02:00
jean-pierre charras
1db63ef36f Pcbnew: copy/paste vias: fix some issues:
- better fix for PCB_VIA::SetLayerSet() than commit 0c959075.
- Ensure saved via from a board and pasted to another board have a layer pair
compatible with this board copper layer count (if not, skip it)
- workaround in PCB_VIA::GetLayerSet() that hang when a LAYER_RANGE has start
and end layers id not compatible with the copper layer count (bug in LAYER_RANGE?)
2024-09-23 17:35:11 +02:00
Seth Hillbrand
7214ef1f14 Remove basic masking class map_string_utf8
This is just std::map<std::string, UTF8>, using the class just masks
what it is and adds unclear functions.
2024-08-19 11:51:13 -07:00
John Beard
24c3102638 Add layer pair cycle action
This is the second piece of the layer pair preset quick
switcher that allows a action (i.e. hotkey) to cycle between
the enabled preset layer pairs.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15227
2024-08-06 23:45:55 +08:00
jean-pierre charras
a7634e57b5 pcbnew: fix a bug when pasting a footprint (after a copy command)
The paste code removed items managed by the footprint when they are not on
an enabled layer.
This is a bug: all items must be kept in the parent footprint.
This is the only one command that tried to remove such items.
Other commands (Ctrl+D, load Footprint and read netlist) do not delete any item
2024-07-28 19:58:28 +02:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
Jeff Young
16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Jeff Young
94223ca794 Handle orientation when pasting footprint items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17518
2024-05-03 21:31:27 +01:00
Jeff Young
eb13dec265 pruneItemLayers() is not the right place to filter refdes & value.
(And we already filter all mandatory fields in
pasteFootprintItemsToFootprintEditor() anyway.)

Also, don't nuke a footprint which contains only fields
during a paste.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17937
2024-05-03 18:38:32 +01:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Seth Hillbrand
d82e8ee41a Map nets in pasted data
Add missing nets to the existing board and use any existing nets of the
same name.

Adds option to clear all nets in Paste Special

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17626
2024-04-01 16:56:44 -07:00
Jeff Young
f9c5e48c57 Add missing PCB_TABLE_T, and a comment. 2024-03-28 14:31:31 +00:00
Jon Evans
7b6afd290a Remove non-const access to board-owned items
(with a few things const-casted for now)
2024-03-26 18:36:23 -04:00
Seth Hillbrand
3cc1617f5a Fix slow selection time when calculating clearance
The clearance between two zones could be rather slow.  This was in part
to trying to do triangle-triangle collisions between zones when we only
need outline collision and in part to the shape_line_chain collision
routine.  The shape_line_chain collisions don't need to recreate
segments on each iteration and should instead create them once and using
this to check all collisions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17327
2024-03-11 16:32:24 -07:00
Seth Hillbrand
686a62cbe6 Temporary fix to disable zone-zone clearance display
When selecting two objects, we display the measured clearance between
them.  This can be problematic with large zones as they have thousands
of triangles.

This is a temporary fix for 8.0.1 to disable the check until we have a
performant version

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17327
2024-03-08 10:31:59 -08:00
Jeff Young
3938c35f17 Repair copy/paste of footprint fields.
Some of the code got lost in the move to PCB_FIELDs.

(cherry picked from commit a9c4a17c38cda55836e38c975d183479e375a748)
2024-02-23 16:53:33 +01:00
Mike Williams
3cd61a2d39 PCB: appending boards should not select existing generators 2024-02-13 10:15:30 -05:00
Jeff Young
d6b39c672e Footprint editor items always get added to footprint.
Also fixes an unrelated crash when assuming the current
editor is the board editor.
2024-01-21 22:51:36 +00:00
Jeff Young
322ad1af45 Implement copy/paste for generators.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16613
2024-01-16 23:38:50 +00:00
Jeff Young
cd83dfa831 Stage/add/delete group members when adding/deleting group.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16540
2024-01-07 13:39:13 +00:00
Ian McInerney
53e16558a5 Refresh appearance panel when appending board
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16226
2023-12-31 17:08:09 +00:00
Ian McInerney
f2702b223c Introduce base IO_MGR class and unify RELEASER objects
The IO_RELEASER is a thin-wrapper around a std::unique_ptr, but done
this way to allow easier addition of a custom deleter in the future if
something needs to call back into the IO_MGR.
2023-12-29 00:37:38 +00:00
Ian McInerney
d7fe668d79 Push PCB_IOs to use the base progress reporter instead of per-function 2023-12-27 17:06:23 +00:00
Ian McInerney
e6632bb983 Rename PCB IO classes/files 2023-12-24 01:22:21 +00:00
Ian McInerney
d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00
Ian McInerney
188b9f4dd5 Fix append board dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16214
2023-11-29 14:01:13 +00:00
Jeff Young
cc721c4907 Improve encapsulation of group internals.
(It's still leaking into BOARD_COMMIT and some other places, but at
least it no longer leaks into all the edit tools.)

Also fixes some bugs when moving/copying/pasting multiple selections
containing length-tuning patterns.
2023-11-09 14:05:35 +00:00
Jeff Young
ac172b944a Don't get stuck cycling through invisible layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16019
2023-11-03 18:17:36 +00:00
Alex Shvartzkop
c8b2e2aa07 closestDist_sq should be ECOORD_MAX initially. 2023-10-23 22:18:45 +03:00
jean-pierre charras
4ffa013467 Fix minor compil and Coverity warnings (not initialized vars) 2023-10-23 20:13:46 +02:00
Jeff Young
d51e058e24 Move diff-pair netname resolution to BOARD.
Also adds reporting of dp gap constaints and max uncoupled to track
selections, and max uncoupled during routing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13748
2023-10-15 22:46:23 +01:00
Jeff Young
d8f35633d4 Modify interactive delete tool to respect groups & selection filter. 2023-10-10 16:04:54 +01:00
Jeff Young
8c017be24a Clearer naming. 2023-10-10 15:43:45 +01:00
Alex Shvartzkop
be72e07e61 Introduce PCB_GENERATOR. 2023-10-08 02:41:17 +00:00
Marek Roszko
22b733209d Fail GAL on its header leaking audit
Maybe we should rethink directly accessing GAL so much, but at least 600 files didn't need GAL leaked into them due to view_overlay.h
2023-09-18 19:52:27 -04:00
Alex Shvartzkop
06463fd35a Fixes for Wayland cursor warping:
- Emulate the mouse position, since no motion events are sent after warp
- Do not call wl_surface_commit to prevent an assert
- Re-organize code a bit
2023-09-18 12:56:54 +00:00
Jon Evans
467c672bcd Fix all-layer snapping for footprint editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15538
2023-09-16 22:55:40 -04:00