188 Commits

Author SHA1 Message Date
Jeff Young
06dcb64ad8 Harden progress reporter API against misuse.
Also, titles are nouns, not verbs.  (Messages
*inside* reporters are verbs.)

Also implements progress reporter for Altium
schematic import.
2025-06-01 19:38:24 +01:00
Jeff Young
96dfff2f07 Better solution to memory leaks. 2025-05-25 11:19:09 +01:00
Jeff Young
d2305957d8 Reduce designBlock memory leaks. 2025-05-25 09:28:37 +01:00
Jeff Young
f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
Mike Williams
22b24bb4df pcb search: don't list generators in groups 2025-05-19 09:10:47 -04:00
Mike Williams
2baeecbee8 groups/design blocks add convenience methods for placing/updating 2025-05-15 14:26:56 -04:00
Mike Williams
d2f0a13515 groups/design blocks: add lib link to groups from design blocks
Also add Place Linked Design Block function.
2025-05-13 10:41:32 -04:00
Seth Hillbrand
99a0f00087 Prevent assertion when flipping
Markers do not flip, so avoid including them
2025-05-07 13:10:43 -07:00
Mike Williams
9ca881112b design blocks: as place as group functionality to schematic 2025-05-06 11:29:42 -04:00
Mike Williams
217b6d0e30 PCB: handle area calculations in groups/generators 2025-05-06 11:29:42 -04:00
Seth Hillbrand
fd0b8fcc3c Add paste length control to PCB Editor as well
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20732
2025-04-30 13:29:52 -07:00
Jeff Young
d421af6e4d Rebuild connectivity after append board.
Append board reads the BOARD_ITEMs directly onto
the board and so pushes the commit with CHT_DONE
flags.  However, this means the added items aren't
added correctly to the connectivity system.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20314
2025-04-14 21:38:01 +01:00
Jeff Young
191327f7e8 Formatting. 2025-04-13 11:42:47 +01:00
Jeff Young
159302063a Move board characteristics and stackup to PCB_TABLEs. 2025-04-12 20:41:01 +01:00
Jeff Young
0659290417 Simplify hatch damage/rebuild and move it out of view.
There should be far fewer hatched objects than other
objects, so we're spending too much effort finding
all the possible damage when we probably should
just be auto-regenerating all the hatching.

This also moves it out of being done during redraw,
which was proving problematic.  Plus the refill
zones architecture does it during commit, and has
a lot more miles behind it.
2025-04-07 11:46:02 +01:00
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Mike Williams
05e9772d54 groups: extract common class methods into EDA_GROUP base class 2025-04-01 14:34:20 -04:00
Mike Williams
a90b8ec57a pcb: merge RunOnChildren/Descendants into one function with a mode 2025-03-27 13:16:09 -04:00
Jeff Young
07eda5d57e ADDED: report copper area for current selection.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20439
2025-03-27 10:14:30 +00:00
Jeff Young
d16a5bf87d Formatting. 2025-03-27 10:14:30 +00:00
Mike Williams
e11cf94a3e design blocks: add PCB design blocks behind advanced config
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2508
2025-03-20 15:13:52 -04:00
Ian McInerney
ea2f8a63c1 Actionize more PCB actions 2025-02-28 01:57:37 +00:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
JamesJCode
5fda0d02e1 Delay resolution of component classes when pasting footprints
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19862
2025-02-07 17:47:51 +00:00
Jeff Young
3078d82bd5 Don't wait for mouse-move to update screen.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19771
2025-01-29 11:23:56 +00:00
Jeff Young
e19bce2f93 Reduce reliance on MANDATORY_FIELDS and their implied order. 2025-01-22 17:51:57 +00:00
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