385 Commits

Author SHA1 Message Date
Jeff Young
8e81d9ec73 Auto-enable user layers that have custom FPEditor names.
(cherry picked from commit 3380afd9fd010143617821c81c59d0d2a1cc7249)
2025-03-29 21:24:32 +00:00
Jeff Young
35e119c152 Don't assert (or crash) on shutdown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20433

(cherry picked from commit 9c375581ff24b15dfb85b15445d786ac16ee33e1)
2025-03-29 21:24:32 +00:00
Jeff Young
aee836d722 Don't disable first internal layer in footprint editor.
It's used as a proxy for all internal layers.

Also fixes LAYER_RANGE_ITERATOR so that it works with an odd
number of copper layers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20246
2025-03-11 18:41:35 +00:00
jean-pierre charras
809948333e Fix compil warnings
(cherry picked from commit 9d1b320896db66a13de468415bd6ebc08bbd6d38)
2025-03-08 09:42:15 +01:00
Jeff Young
f92c46d585 User layer bug fixes.
1) Don't set user layer count right after we've
cleared the enabled user layers.  (It will
always be 0 by then.)

2) Allow un-enabled layers in some layer
selectors.  (Currently this is just the private
layers selector.

3) Reset the appearance panel layers each time a
footprint is loaded.  Also, auto-enable any user
layers that the footprint already has.

4) Footprint editor layer visibility is stored in
the view, not in the boars (as is usual).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20022
2025-03-05 16:39:52 +00:00
jean-pierre charras
2504195e6e Fix a collision with a Windows define and our use of the same var name.
We use IN for INCH as units, but IN is defined in a Windows header

(cherry picked from commit b0fe4df3c565027801cbbac56c6ee0da254bd74a)
(cherry picked from commit 0acdabd1eb1a2d5ab9b6aa9f71df31c8cf088de8)
(cherry picked from commit eaa1e6d59464e8356d24afd1d29148335010f67a)
2025-03-02 16:13:11 +01:00
Jeff Young
203ddb7b47 Code brevity.
(cherry picked from commit f951497a4fdf47e7c839f71df7a1b06660540ec9)
2025-03-01 22:23:30 +00:00
Jeff Young
3a91fc8c2b Apply EEschema fixes to PCBNew and Footprint Editor.
(Symbol Editor doesn't have the issue of the properties
being overwritten.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20066

(cherry picked from commit 797de67c6c21d6295e32c340a4eca97685fa370a)
2025-02-27 17:51:34 +00:00
Jeff Young
8874f137fa Read hotkeys from disk after they change.
(Otherwise we'll write the old versions back out
when closing one app.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19612
2025-02-01 20:01:13 +00:00
Jeff Young
9083c9e6ab Remove dead code. 2025-01-29 20:54:33 +00:00
Seth Hillbrand
81fbaacae2 Keep track of user layer mapping for footprints
Footprints in orgs have standard naming.  We need to allow designers to
keep their standard namings outside of boards where they are fixed.
This belongs in the preferences as a set-once for local standards
2025-01-28 12:22:39 -08:00
Alex Shvartzkop
0216b186aa Disable Bezier and Table tools when no footprint is loaded. 2025-01-21 01:15:22 +03: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
Jeff Young
753d385473 Reduce dependency on dynamic_cast.
Also switches to checking __clang__ instead of __WXMAC__.
2024-12-08 21:46:54 +00:00
Seth Hillbrand
5eb11f705b Ensure that auimanager has a frame
restoring the last footprint might ask for the infobar, which requires
the auimanger to have a frame

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19103
2024-11-18 12:11:31 -08:00
John Beard
39d72a84df Pcbnew: register array tool in FP editor 2024-11-10 19:07:06 +08:00
Alex Shvartzkop
bc7d5c821c Fix some warnings. 2024-11-03 00:01:26 +03:00
John Beard
3b2f6d9d03 FP editor: string consistency
119eea38c3fd345af45aef44579ab66a35990cd1 changed to using
%s rather than '%s' - follow that convention in the FP editor
strings.
2024-11-01 11:21:18 +08:00
John Beard
78d626d38c FP editor: add call-to-action to open a board footprint in the library
Useful both as a confusion reduction measure when confronted with the
inforbar message, and also useful when you pressed Ctrl+E, not
Ctrl+Shift+E.

Also bind Ctrl+Shift+E in the editor to perform this action
(again, useful when you used the wrong hotkey).
2024-11-01 10:29:59 +08:00
John Beard
418e81702f FP editor: choose the right conflict resolution... 2024-10-17 00:32:27 +08:00
John Beard
2fd2e1d837 FP editor: a 'new' footprint with no library is 'editable'
When creating a footprint from the main menu, as opposed to from
a library context menu, there is no library set until it's saved
(the user will get a save-as dialog to set the library at that
point). So lack of a library doesn't mean 'read-only'.

So, don't show the 'read only library' warning in that case -
the user will not be able to save the footprint "in place" as there is
no "place" yet, but it's a reasonable and consistent workflow (like
editing a File->New'd file in a text editor).
2024-10-17 00:15:28 +08:00
John Beard
b092675171 FP edit: add 'show datasheet' action that acts on the documentation link
This is already shown in the footprint browser window as a special
item, so allow the 'D' hotkey to access it as well.
2024-10-14 23:20:19 +08:00
John Beard
c34ba1a834 Pcbnew: button to save editable copy when in read-only lib
Counterpart to the sym editor change. It will only copy
the FP in question, rather than also offer to to copy the whole
library, as that function isn't obviously available.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18370
2024-10-14 22:21:27 +08:00
Mike Williams
867cb58175 feature removal: remove Show Hidden Text
Does not work properly since 8.0 introduction of footprint fields.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18656
2024-09-19 15:41:44 -04:00
Jeff Young
3441861988 Make arrow keys respect grid overrides. 2024-08-28 19:54:23 +01:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
Seth Hillbrand
77797103f7 Add ability to embed files in various elements
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures.  File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.

kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document.  Embeds are allowed in schematics, boards,
symbols and footprints.  Currently supported embeddings are Datasheets,
3D Models and drawingsheets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6918

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2376

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827
2024-07-15 16:06:55 -07:00
Seth Hillbrand
d21eba4021 Unselected tree before syncing
On GTK, the selected item is checked for its parent when being
unselected.  This breaks if the parent has been removed by the Sync()
call, so we need to ensure that the unselect all call happens prior
2024-06-14 16:49:56 -07:00
Jeff Young
ed0869aa0c Share more library tree code. 2024-06-08 19:06:10 +01:00
John Beard
4dd049ee8f Add action to focus tree searches
The default hotkey is Ctrl+L, as this is not bound by
default in the FP or symbol editor, and it is the hotkey
that is used to focus the address bar in web browsers,
which is a similar kind of action.
2024-05-05 04:18:36 +08:00
Jon Evans
1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
Marek Roszko
0c8e08ed58 Move some language changes to a event on the frame 2024-03-03 11:02:26 -05:00
Jeff Young
e445249720 ADDED: PCB tables. 2024-02-24 20:05:51 +00:00
Jeff Young
9ff66d0e71 Don't capture references to local variables for CallAfter.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16934

(cherry picked from commit 9d40374baff216b5dbe18438d2948bc3915ebf0a)
2024-02-23 16:53:30 +01:00
Jeff Young
cc058a7927 Exit pad edit mode before closing footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16766
2024-01-26 13:49:17 +00:00
Jeff Young
1597882c1f Allow creation of groups with a single member.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16586
2024-01-19 17:32:00 +00:00
Marek Roszko
7b24167398 FromDIP symbol and footprint editor aui panes 2024-01-17 23:08:38 -05:00
Marek Roszko
b4bfdf95d3 Explicitly add 48, 128, 256 to icon bundles for each app 2024-01-16 17:21:44 -05: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
Jon Evans
ae13a46ace Fix display of footprint parse errors at load 2023-11-29 16:17:41 +00:00
Jeff Young
6d43ef5678 Don't specify sizes when we don't need to.
However, in some places we *do* have to because otherwise wxWidgets
will pick a minimum size for us (and it's rather large).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16039
2023-11-07 14:53:41 +00:00
jean-pierre charras
93b5038382 FOOTPRINT_EDIT_FRAME: ensure the canvas type comes from the FOOTPRINT_EDITOR_SETTINGS config
Previously, although the fp editor preferences has an option to select the canvas type,
it was read from the the PCBNEW_SETTINGS config, using Kiface().KifaceSettings().
2023-10-26 17:58:33 +02: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
Jeff Young
435e3fab8d Support text variables in STEP export filename.
Also fixes some other file browser titles to match Kicad's overall style.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15927
2023-10-23 18:01:47 +01:00
Marek Roszko
ba83e84b91 Move SaveCanvasImageToFile to EDA_DRAW_FRAME rather than leaking things to bitmaps 2023-10-16 18:33:11 -04: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
bf493f32f5 Nullptr safety for various panels.
Also moves preference saving out to parent as different parents
save different settings.
2023-09-25 12:35:54 +01: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
ff49d5ada9 Fix ambiguous overloads on wx 3.3 2023-09-14 19:05:46 +03:00