199 Commits

Author SHA1 Message Date
John Beard
4bebd09bd0 EDA_LIST_DIALOG: Simplify ctor args
Sometimes you want to add these in the ctor of the child
class based on some logic and having to construct the vector
in the init-list is a bit ugly.

Theoretically allows to not require a vector too.
2025-08-26 23:34:46 +08:00
Jeff Young
55a36c1ce7 CHANGED: retire the select-lib-table dialogs.
We now allow the user to specify which in the
New Library dialog.

Also retires the "Export power symbols too" dialog.

Also gives a bunch of file and library dialogs
more explicit titles.

Also removes separate code-paths for Export to
Library and Export to New Library.  The regular
code path has a "New Library..." button now.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16323
2025-07-20 19:06:40 +01:00
Seth Hillbrand
6cd076eed4 Blast quite a bit of LOCALE_IO into the sun
After forcing the locale-specific read/writes out of our IO, we can
remove the global LOCALE_IO calls in many places.

Still to do: exporters, pcm, specctra, settings, drawing sheets,
plotters
2025-07-14 15:30:42 -07:00
Jeff Young
a7e2878e6b Kicad SEXPR should no longer need LOCALE_IO. 2025-07-14 13:17:53 +01:00
Jeff Young
68d4940087 Thread-safety (potentially KICAD-VMX...)
... KICAD-6PV, KICAD-82, KICAD-R3A, and others.
2025-07-13 15:25:10 +01:00
Alex Shvartzkop
4a5039c2cf Remove some unused variables. 2025-07-02 16:48:26 +03:00
Jeff Young
a5ae1103e4 Nullptr safety (KICAD-1R8). 2025-06-30 21:26:54 -06:00
Jeff Young
238719184e Prevent assert (and access violation) in wxWidgets.
(It directly dereferences the ArrayString with the
FilterIndex, without bounds checking it.)
2025-06-30 11:59:08 -06:00
Jon Evans
76465bdc1a Add prettifier support to ExportFootprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21071


(cherry picked from commit 1bc11d0e77c0868078f28c6f9adc3c654be48b6a)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-06-07 10:18:39 -04: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
Jeff Young
f0ebf0a7cc Don't assume existence of default FP text items. 2025-04-07 18:19:10 +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
5edae8250d Finish eradication of visibility flag on text items.
Import/read previously-hidden symbol/footprint
text items as hidden fields.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19875
2025-02-19 23:43:52 +00:00
Jon Evans
1911cfe61b Fix footprint defaults setting storage after layer ID changes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19873
2025-02-07 08:40:43 -05:00
Seth Hillbrand
112e8e7ccb Remove a few more crashers
Need to check SYM_LIB_TABLE_ENTRY for null but need to check
FP_LIB_TABLE_ENTRY for throwing
2025-01-29 00:00:11 -06: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
Seth Hillbrand
8f360f1a69 Avoid lock-up during fp export
We do not need to re-validate the fp cache each fp we export, especially
when we just created the library.  This locks up pcbnew for larger
boards
2024-12-30 12:57:15 -08:00
Jeff Young
1eb26b439a REMOVED new footprint dialog.
We now just create an "Untitled" footprint.

Also fixes a bug where the preview of new footprints
would zoom in too far.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17573
2024-05-31 10:36:51 +01:00
Seth Hillbrand
54efd32f7a Ensure nets are referenced to main board
We set new elements to the temporary board's netlist.  These need to be
updated when moving the fooprint to the main board

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17242
2024-05-27 11:30:43 -07:00
Jeff Young
af5ed5a118 Reset zone offsets when exporting footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17794
2024-05-17 21:28:30 +01:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Jeff Young
da46a96623 Update a few strings based on new string freeze policy. 2024-02-05 15:49:57 +00:00
Jeff Young
9eb8ec7733 Comments and menu-capitalisation. 2024-01-28 11:13:48 +00:00
Ian McInerney
4770532511 Ensure footprints are removed from group before exporting to library
Duplicating a footprint automatically adds it to the group the original
is contained in, and these copies should not be part of the board after
their use.

Fixes KICAD-5YC
2024-01-03 00:19:29 +00:00
Jeff Young
71b9dd1fb4 Update FPWatcher when saving canvas footprint.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16414
2023-12-31 11:26:16 +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
Marek Roszko
9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05:00
Ian McInerney
f8688a922d Unify IO library descriptors 2023-12-27 16:34:59 +00:00
Ian McInerney
743e9d669a Push library management into IO_BASE 2023-12-27 01:21:53 +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
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
14d5a404b2 Don't leave deleted items in a group.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15797
2023-10-14 18:23:51 +01:00
Jeff Young
8760bd8c80 Reconcile "apply defaults to new footprints" with DRC lib checks.
Moves apply defaults settings to Board Setup (where they were
duplicated anyway due to an earlier botched merge).

Modifies the apply-to-graphics algorithm to skip copper shapes.

Modifies DRC library check to skip STROKE_PARAMS for non-copper
shapes.
2023-10-02 22:10:13 +01:00
Marek Roszko
6b12a12b3e On second thought rename PROJECT_PCBNEW to PROJECT_PCB 2023-09-27 23:15:54 -04:00
Marek Roszko
7e8b18035f Eliminate the conditional pcbnew/cvpcb definition of PROJECT 2023-09-27 20:53:46 -04:00
Jeff Young
ec97ac189c Fix typos in FOOTPRINT_EDIT_FRAME::SaveFootprintAs().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15678
2023-09-18 13:12:13 +01:00
Jeff Young
c07e9c834f Validate new footprint / save as footprint info before exiting dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13923
2023-09-06 12:49:37 +01:00
Alex Shvartzkop
90eb59cf9f Fix saving a new footprint library.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15563
2023-09-01 23:30:27 +03:00
Alex Shvartzkop
e128896ba6 Schematic plugins refactoring, fixes for PCB plugins.
- Move PLUGIN_FILE_DESC to common.
- SCH_PLUGIN: rename Load -> LoadSchematicFile, Save -> SaveSchematicFile.
- Use PLUGIN_FILE_DESC and CanRead* in schematic plugins.
- Return none/unknown types from Find/GuessPluginType functions.
- Iterate over file types for file wildcards.
- Clean-up header checking in IO plugins.
- Use PCB plugin list in IO_MGR::GuessPluginTypeFromLibPath.
2023-08-31 05:08:03 +03:00
jean-pierre charras
a7e74bf4bc Fix a few minor compil and Coverity warnings. 2023-08-17 20:31:40 +02:00
Alex Shvartzkop
d02e4f3254 Fix PLUGIN_FILE_DESC copy warning, remove a leftover comment. 2023-08-17 14:43:59 +03:00
Alex Shvartzkop
76e0d5981d Import system refactor for PCB plugins. 2023-08-15 05:26:12 +03:00
Jeff Young
56752e9bad Move some MRU paths from app to project.
Also augments Save As path updating to handle these newly-moved paths,
and to handle absolute paths that point into the project directory.
2023-07-12 17:30:42 +01:00
Mike Williams
3a7de82243 PCB: respect styling settings when inserting footprint from editor
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15155
2023-07-11 08:16:48 -04:00
Jeff Young
db61fe03b3 Prefer MRU path to LastImportExportPath for importing footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15102
2023-07-09 22:28:26 +01:00
Ian McInerney
d923b871d7 Remove group reference when exporting individual footprints 2023-06-29 00:17:12 +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