Commit Graph

57 Commits

Author SHA1 Message Date
Jeff Young fa0ead98d8 Split out table editing and table cell editing. 2024-02-24 20:05:51 +00:00
Jeff Young e445249720 ADDED: PCB tables. 2024-02-24 20:05:51 +00:00
Jeff Young 1ff36f23b8 Clean up stale TODOs. 2024-02-05 15:49:57 +00:00
jean-pierre charras 715a5ee47b array_creator: fix issues (crashes) in board editor and footprint editor:
- In fp editor, fields cannot be duplicated: each is unique.
duplicating fields created a crash and issues in undo/redo command
- In board editor after creating an array with footprints.
- crash when closing pcbnew
- error when undoing the array creation
The crash was due to call run this_item->RunOnDescendants() on footprints: it
must be run only on a PCB_GROUP.
2024-01-27 17:02:20 +01: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
Wayne Stambaugh 9e1caa0d39 Fix crash when creating an array of footprint fields in board editor.
Attempting to create an array of footprint child objects other than a pad
causes the crash due to the fact that only pads where checked.  The change
now checks if any object has a footprint as a parent.  This should prevent
any future issues when new footprint child objects are added.

There was also another subtle bug fixed when more than one child object of
a footprint were selected, the array feature would make as many copies of
the footprint as selected child items.

https://gitlab.com/kicad/code/kicad/-/issues/16088
2023-11-18 11:18:18 -05: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 791aa64950 Functionally it's a "reference image".
The implementation happens to be a "bitmap".

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15932
2023-10-24 15:44:21 +01:00
Alex Shvartzkop be72e07e61 Introduce PCB_GENERATOR. 2023-10-08 02:41:17 +00:00
Jeff Young cf8294b5c2 Remove a bunch of blind (and a few redundant) static_casts. 2023-07-13 14:14:45 +01:00
Ian McInerney 2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Ian McInerney 480223f67c More RunAction specialization 2023-06-20 21:52:50 +01:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Alex 126d224e44 array_creator: Transform item before adding, modify only the first one. 2022-11-19 04:07:35 +05:00
Jeff Young 0c8787cbb9 Some more wxPoint/EDA_RECT yeeting. 2022-08-31 00:44:33 +01:00
Mike Williams 3669cb4673 PCB Editor: Add User Background Images 2022-07-14 11:23:23 +00:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
Jeff Young 1b19ff5f42 More EDA_ANGLE changes. 2022-01-14 16:08:19 +00:00
Jeff Young c9487bad18 Move BOARD_ITEM::Rotate() to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young 4b6bf3095a Radial dimensions.
ADDED radial type dimensions.

Fixes https://gitlab.com/kicad/code/kicad/issues/2056
2021-12-23 19:34:54 +00:00
Roberto Fernandez Bautista a79a221257 Array creator tool: Add option to assign unique reference designators
ADDED: Option to assign unique reference designators to footprints
created with the array tool [pcbnew]

CHANGED: Array creator dialog no longer displays pad numbering properties
when in the board editor. [pcbnew]

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2354
2021-10-25 22:38:49 +01:00
Jeff Young e6ca9837a2 Clear numbers from non-numberable pads and don't run DRC on them.
This was also the last straw on the misnamed PAD::GetName() and
PAD::SetName(), which are now PAD::GetNumber() and PAD::SetNumber().

Fixes https://gitlab.com/kicad/code/kicad/issues/9017
2021-08-24 01:03:06 +01:00
Wayne Stambaugh cf00319c85 More NULL expunging. 2021-07-20 07:27:18 -04:00
Jeff Young e895af4ec6 Include arcs in create array. (Thanks to RigoLigoRLC.)
Fixes https://gitlab.com/kicad/code/kicad/issues/6491
2021-07-08 18:28:21 +01:00
Ian McInerney 23f8851409 Remove pcb_group include from board header 2021-06-03 20:03:31 +01:00
Mikolaj Wielgus aa09d6448a Pcbnew: Allow Create Array on groups
Also removes possible null pointer dereferencing.

Fixes https://gitlab.com/kicad/code/kicad/issues/7515
2021-04-03 09:06:49 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young 3451ac3088 PCB_MODULE_T -> PCB_FOOTPRINT_T 2020-11-13 15:16:24 +00:00
Jeff Young 522d64968e Yet more module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young f5443de7f9 D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
Jeff Young f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
Jeff Young 4dc877d0e9 Module -> Footprint. 2020-11-08 21:43:19 +00:00
Seth Hillbrand f8a4edb1c9 First pass renaming module to footprint
This is mostly in comments and the few remainin text strings that
reference module
2020-10-20 20:49:11 -07:00
Jeff Young 7a4900b8dc PCB_LINE_T -> PCB_SHAPE_T and PCB_MODULE_EDGE_T -> PCB_FP_SHAPE_T
Also updated footprint text and zone types for consistencey.
2020-10-04 16:49:04 +01:00
Jon Evans e9b627bfd8 ADDED: Center marker dimension type 2020-09-16 20:55:11 -04:00
Jon Evans 75ffce1a0b ADDED: Leader dimension object
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5555
2020-09-15 23:37:38 -04:00
Jeff Young 692aeff334 Fix a bunch of usages of copy ctor that really meant duplicate.
In particular, "duplicate" means "with a new KIID".

Fixes https://gitlab.com/kicad/code/kicad/issues/5127
2020-08-10 14:23:11 +01:00
Jeff Young 56946f4db1 Fix pad name increment to use last edited pad.
Fixes https://gitlab.com/kicad/code/kicad/issues/1882
2020-05-03 08:59:51 +01:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Seth Hillbrand 76c26d6ae1 Remove unneeded unique_ptr
The unique_ptr was useful when the original function took multiple paths
which could de-scope the pointer.  Current use allowed potential
use-after-free. This is now re-written to pass pointer directly.
2020-01-11 17:29:12 -08:00
Jon Evans f49779465e Fix broken build in array_creator 2019-06-01 16:30:58 -04:00
Jeff Young f67df4bf11 Collapse ARRAY_CREATOR into single class now that legacy instance is gone.
Also removes AllowLegacyCanvas ADVANCED_CONFIG option.
2019-06-01 16:29:12 +01:00
John Beard eb1e67583f Pcbnew: tidy up array options access/allocation
Use unique_ptrs for ownership transfer.

Pass the target object to the constructor rather than
creating an internal verison.
2019-05-16 11:20:52 +01:00
John Beard 26d04269ac Pcbnew: disable module numbering in pcbnew arrays
The module refdes always increment by one. This is problematic
for two reasons:

* It doesn't work when more than one FP is selected (say you have
  C1 and C2, you get C1, C2, C2, C3)
* It messes with simple panellisations

The 5.0.x behaviour is to not renumber in Pcbnew, so revert to
that behaviour.

Better refdes incrementation can come post 5.1, as this will need
new strings and UI.

Fixes: lp:1819106
* https://bugs.launchpad.net/kicad/+bug/1819106
2019-03-08 10:34:43 +00:00
John Beard 6558bd9381 Pcbnew: Also transform and number the original item
The original item is part of the array, so give it a number
and put it in the right place (all current array tools have
a null transform for the first item, but it's not part of the
contract. For example, a circular array with an angle offset
might want to move the first point).
2019-01-30 15:41:35 -08:00
John Beard 453a91f661 Pcbnew: arrays skip existing names
The current module cannot be queried for existing pads as we
add them (because we never commit, until we finish the whole array).

Instead, pre-gather the names and check as we add, skipping any existing
names.

Note: this will not prevent arrays becoming "mis-ordered", but there
is not a lot we can do to prevent all possible errors.

Fixes: 1808706
* https://bugs.launchpad.net/kicad/+bug/1808706

The same principle could be used to skip existing ref-des'es on PCBs.
2019-01-30 15:41:35 -08:00
John Beard 5504981d00 Separate ARRAY_OPTIONS to own class in common
The geometry and numbering logic is separate to the dialog, and
can be separated for clearer logic and better testability.

Moreover, refactor it to avoid any dependency on pcbnew
classes, so it can be move to common for potential re-use in
eeschema and friends in future.

Also convert all wxPoint logic in these classes to VECTOR2I and
fix some function visibilities.

Add some unit tests of the ARRAY_OPTIONS geometry and numbering.
2019-01-30 15:41:35 -08:00
John Beard ec91329da0 Pcbnew: Array tool should not number NPTHs
Devolve the logic as to whether a pad should be numbered or not
to a pad utility function. Add a very simplistic test for this
function (demonstrating how to test BOARD_ITEMs in general).

Fixes: lp:1804787
* https://bugs.launchpad.net/kicad/+bug/1804787
2019-01-06 07:55:49 -08:00
Jeff Young e55bb9e748 Increment references when creating an array.
While it's not always correct, not doing so is pretty much always
incorrect.

Fixes: lp:1625964
* https://bugs.launchpad.net/kicad/+bug/1625964
2018-07-25 14:41:20 +01:00
Jeff Young 4618c64213 Don't number aperture pads.
Fixes: lp:1781760
* https://bugs.launchpad.net/kicad/+bug/1781760
2018-07-24 10:39:30 +01:00