Commit Graph

180 Commits

Author SHA1 Message Date
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
Mike Williams 6d93950dcc PCB: abolish TEXT_TYPE::TEXT_is_*
PCB_TEXT is now always what was formerly TEXT_is_DIVERS and PCB_FIELDs
now what mandatory field type they are already.
2023-06-20 18:34:52 +00:00
Mike Williams 37837dc392 PCB: introduce PCB_FIELD_T 2023-06-20 18:34:52 +00:00
Mike Williams a859b25d2c PCB: convert footprints to use PCB_FIELDs for fields from schematics 2023-06-20 18:34:52 +00:00
Seth Hillbrand 14f6e32c74 ADDED: Change watcher for libraries
When editing or viewing library symbols, the files are watched for
underlying changes.  If any occur, the user is either prompted to reload
(if reloading would overwrite their current edits) or the file is
silently updated to the current version on disk.

This also sets a custom assertion handler to avoid unneeded crashes when
recieving invalid SAMBA packets and turns off assertions entirely when
running in release (non-debug) mode
2023-05-31 13:46:00 -07:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Jeff Young c4ef08bead Exercise more caution with user filenames.
In particular, don't assume "1" is an extension in "Schematic_1.1".

Fixes https://gitlab.com/kicad/code/kicad/issues/14263
2023-03-12 15:52:45 +00:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
jean-pierre charras df4f9d4c94 FP editor: fix crash when trying to save a footprint after removing its library
Fixes #13619
https://gitlab.com/kicad/code/kicad/issues/13619
2023-01-21 18:18:38 +01:00
Seth Hillbrand 7e5a2450b8 Move multiple wxMessageBox to DisplayErrorMessage
Also provide protection for headless running in multiple callsites

Fixes https://gitlab.com/kicad/code/kicad/issues/13575
2023-01-18 16:54:01 -08:00
Seth Hillbrand 2399759c03 Allow default sexpr libs to have '.' and no .pretty
We default to KICAD_SEXPR format.  In this case, if the library doesn't
have the .pretty extension, the full directory name including a '.' is
the correct nickname

Fixes https://gitlab.com/kicad/code/kicad/issues/13388
2023-01-06 10:08:32 -08:00
Jeff Young 365674dfdf Footprints in the footprint editor can't be in a group. 2022-11-13 13:18:42 +00:00
Jeff Young fa679d3601 Pinned libs can also be found in program settings. 2022-07-23 20:17:04 +01:00
Jeff Young eb27a3f8b9 Added pinning support to various EDA_LIST_DIALOGs.
Footprint Save As, Symbol Save As, etc.
2022-07-09 20:44:49 -06:00
Jeff Young c6f83b6dec ADDED Duplicate Footprint, Rename Symbol and Rename Footprint. 2022-04-22 22:06:51 +01:00
Jeff Young 08f15fe587 ADDED New Library functionality to Footprint/Symbol Save As.
Fixes https://gitlab.com/kicad/code/kicad/issues/2343
2022-04-19 19:55:30 +01:00
jean-pierre charras dbfdd3fb56 Fix some Coverity warnings. 2022-03-06 09:48:33 +01:00
Seth Hillbrand fab78af176 Remove TEDIT
This marker is not used in KiCad and creates merge conflicts when two
different users edit the same file
2022-03-01 00:25:44 +00:00
jean-pierre charras a178de8744 FP editor: fix crash when trying to export a footprint to the board editor. 2022-02-27 08:38:19 +01:00
Jeff Young 85805b95ba Cancel or commit pad edit mode when switching footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/10209
2022-02-19 19:36:19 +00:00