131 Commits

Author SHA1 Message Date
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Jeff Young
3c71e7ab09 Auto-recognize URLs in SCH_FIELD and PCB_FIELD grids.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17066

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17745
2025-02-19 23:43:53 +00:00
Wayne Stambaugh
f45915ba93 Eeschema folder housekeeping. 2025-02-06 09:47:00 -05:00
Seth Hillbrand
919931f0f0 Get embedded files panel working for lib_symbol
The symbol library embedded files were implicit, which made them hard to
work with.  Adding the panel makes it clearer and setting the panel
correctly to the callback ensures that the structure is updated on
close.

Adds some copy/move semantics for EMBEDDED_FILES to take advantage of
how the multiple copies are handled in the library editor

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18935
2025-01-28 12:22:39 -08:00
Jeff Young
fccb661487 More MANDATORY_FIELDS work.
Also fixes a crasher when Cancelling a FIELDS_GRID
dialog with one of the grid editors currently open.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19762
2025-01-27 17:02:17 +00:00
Jeff Young
8fe8637297 Fix yet more assumptions about field IDs and order.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19710
2025-01-22 18:17:18 +00:00
Jeff Young
4fe05bfe47 Remove some more usages of MANDATORY_FIELDS. 2025-01-21 23:38:55 +00:00
Jeff Young
a0dd0485e9 Pull a little harder on the MANDATORY_FIELDs string.
We still conflate the fieldID, the position in the
array of fields, and whether or not that means the
field is mandatory.  But this attempts to clean up
*some* of that, without introducing too much risk.
2025-01-21 16:48:13 +00:00
Jeff Young
d50b69f1ae Reconcile divergence of MANDATORY_FIELDS between symbols and footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19697
2025-01-21 13:28:28 +00:00
Jeff Young
1cdb54f45e Allow editing of Private flag through Symbol Properties. 2025-01-05 21:23:25 +00:00
Jeff Young
612b0a09dc Hide private fields from Symbol Properties dialog in schematic editor. 2025-01-05 20:48:48 +00:00
Jeff Young
35b2f36759 Cleanup. 2025-01-05 20:48:48 +00: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
jean-pierre charras
2500d5066a Fp chooser: fix filter by pin count (incorrect count) with multi unit part
Previously, the pin count was the unit pin count, that is incorrect to select
a footprint. the symbol pin count is now used.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/
2024-08-14 13:13:29 +02: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
Mike Williams
a5e2615251 Revert "SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL"
This reverts commit 0b187e71227d2129d271f24fb92ae0b99b6f93bd.
2024-06-12 13:30:29 -04:00
Mike Williams
0b187e7122 SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL
Also always always flatten incoming lib symbols.
2024-06-10 08:36:42 -04:00
Jeff Young
f7bef5e09b Generalize EnhanceAttr() function.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17735
2024-05-16 16:28:13 +01:00
Jeff Young
a99377c1ec The user can cancel the opening of many editors.
Don't play dice with the devil.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17989
2024-05-08 18:21:42 +01:00
Jeff Young
95136494b3 RIP LIB_PIN. 2024-04-20 12:10:31 +01:00
Alex Shvartzkop
affcfed677 Fix some warnings. 2024-04-14 01:19:39 +03:00
Jeff Young
d77eae3e7e Collapse LIB_FIELD into SCH_FIELD. 2024-04-13 15:42:13 +01:00
Jeff Young
72ba31ba27 Pass symbol's netlist to footprint preview widget.
This allows us to show the pin functions on the corresponding
pads.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17349
2024-03-09 15:01:59 +00:00
jean-pierre charras
428f2087bd Eeschema: fix crash when editing a old legacy schematic with missing libs,
and trying to edit a dummy symbol. (crash due to a null pointer due to missing lib)
Fixes #17232
https://gitlab.com/kicad/code/kicad/-/issues/17232
2024-03-02 15:23:23 +01:00
Jeff Young
99948de45a Support pin count and footprint filters in symbol editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17105
2024-02-25 13:14:31 +00:00
Jeff Young
e7abeb3c38 Cleanup. 2024-02-24 20:05:51 +00:00
Mike Williams
2a04e6ac63 Schematic: don't allow setting footprint for power symbols
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16505
2024-01-03 08:52:08 -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
63454d6da9 Prevent crash when opening properties of missing symbol 2023-12-23 17:30:29 -05:00
Alex Shvartzkop
9ed19192de Improve editing values with {return} in text fields; Add hyperlink detection. 2023-10-15 01:45:39 +03:00
Wayne Stambaugh
5d6ef69726 Coding policy and Doxygen comment fixes. 2023-10-12 09:36:28 -04:00
Jeff Young
a3d83cdb6d Pass symbol netlist from Field Properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15806
2023-10-02 23:41:06 +01:00
Marek Roszko
2f2c8b9414 Fix printf assert
Fixes KICAD-41B
2023-09-30 15:38:23 -04:00
Jeff Young
423a5b9961 Fix format string specifier. 2023-09-30 17:38:44 +01:00
Jeff Young
fa11e9138d ADDED support for pin and fp filtering in FOOTPRINT_CHOOSER.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7176
2023-09-29 17:03:50 +01:00
Marek Roszko
8c6899b0d3 Tear out the eeschema conditional compile of PROJECT 2023-09-27 23:05:30 -04:00
Jeff Young
1047130046 Push most of footprint chooser into PANEL_FOOTPRINT_CHOOSER.
Create 2 wrappers for it: DIALOG_FOOTPRINT_CHOOSER and
FOOTPRINT_CHOOSER_FRAME.  The first now gets called from wxGrid
editors, text button editors (such as Change Footprints), etc.

Retire FOOTPRINT_VIEWER_FRAME_MODAL.  FOOTPRINT_VIEWER_FRAME still
exists, but has very few uses at this point.
2023-09-27 16:02:13 +01:00
jean-pierre charras
a568e4f4d3 Fiw a few compil and Coverity warnings. 2023-09-18 18:15:02 +02:00
Alex Shvartzkop
6b68d2c946 Vertically center combo cells in symbol fields grid. 2023-09-18 17:27:30 +03:00
Jeff Young
6f62565093 Handle flipped horiz/vert justifications in FIELDS_GRID_TABLE.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15677
2023-09-18 12:38:34 +01:00
Jeff Young
686dfba77a ADDED autocomplete for value field in Symbol Properties dialog. 2023-08-02 20:45:52 +01:00
Mike Williams
7d84fa2a9d Validators: drop unused is m_isLibEditor 2023-06-20 18:34:52 +00:00
Jeff Young
d3edad3c92 Formatting. 2023-05-31 17:26:54 +01:00
Jeff Young
421d6b2ef8 Retire LIB_ID_VALIDATOR as it prevents usage of text variables.
(We perform more complete checks in ERC anyway.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14764
2023-05-31 17:26:54 +01:00
Jeff Young
b41d446f58 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Wayne Stambaugh
66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04: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
Mike Williams
5995e0e516 Power Symbols: make value editable, use as netname
QA: update tests for editable power symbol values
2023-02-22 18:01:47 +00:00
Marek Roszko
39e69a3d29 Fix up handling of font names available in multiple names
ttf fonts can declare multiple language names. Many by default opt to just declare one and not tag it any particular language.
However, there are CJK languages that typically leverage this function the most. They'll tag both a "en" and a cjk lang family name in CJK characters.

To be as user friendly as possible, we need to display said fonts in the CJK languages if KiCad to set to such a locale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14011
2023-02-21 20:26:41 -05:00