97 Commits

Author SHA1 Message Date
Jeff Young
702f774a1f Bring DIALOG_LIB_FIELDS into line with DIALOG_SYMBOL_FIELDS_TABLE. 2025-09-06 15:10:30 +01:00
John Beard
8709f73b98 Symbol editor: simplify root symbol-finding 2025-09-03 00:30:56 +08:00
John Beard
e76b2089bb Symbol edit: add symbol flatten action
This removes inheritance from the symbol.

This doesn't play well with undo, but then again, neither does symbol
deletion, so that seems like a higher-level symbol editor issue.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/8895
2025-09-03 00:24:32 +08:00
John Beard
b34746e06b Symbol editor: allow editing all related symbols from the treeview
This makes it more straightforward to edit a group of related symbols
(related = all derived from the same parent, including the parent).

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/21067
Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/9742
Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/11506
2025-09-03 00:24:18 +08:00
John Beard
9b14434fc3 Symbol editor: allow to inject the symbol list into DIALOG_LIB_FIELDS
This will permit editing fields for subsets (e.g. only symbols in
a certain inheritance hierarchy)
2025-09-03 00:24:12 +08:00
Seth Hillbrand
9cba910d53 ADDED: Library Table Editor
Edits all symbols in a library at once.  Supports copy/paste, multiple
field assignment and selective coloration based on existing data

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11506
2025-09-01 21:47:14 -07:00
Jeff Young
4024a15a17 Don't reference stack variables from a long-life lambda.
In particular, a lambda for conditional menus should
never capture more than `[this]`.  Even the tool's
frame pointer could change.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21615
2025-09-01 12:44:20 +01:00
Jeff Young
6dd4e01f16 ADDED: custom body styles.
(Also moves editing of unit display names to the
Symbol Properties dialog and retires the Set Unit
Display Name dialog.)

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14843
2025-08-27 18:11:56 +01:00
Jeff Young
33c73d7db4 Fix crashes when settings manager doesn't exist yet. 2025-08-14 11:33:25 +01:00
Jeff Young
233da7934d Don't force symbol to have a library (KICAD-74K). 2025-07-02 23:10:10 -06:00
Jeff Young
d5eeef0f2c Don't presume symbol library still exists (KICAD-74C). 2025-06-27 22:59:12 -06:00
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Jeff Young
5996cffabc EE -> SCH (no functional changes) 2025-03-13 13:15:47 +00:00
Jeff Young
6b146874c1 Restore "Export Symbol".
The workflow turns out to be slightly different
than a Save As to a new library.

(We don't assume it goes in a library table; we
flatten the symbol; and we pre-load the library
name.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20070
2025-03-03 12:37:36 +00:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Jeff Young
aaca66351e Case-insensitive collision detection for symbol names.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19370
2025-02-24 11:08:29 +00:00
John Beard
84f4f7f724 Lib editors: avoid bogus overwrite prompt when renaming to self
Just accept the dialog and then early-return.
2025-01-22 19:35:54 +08:00
John Beard
78cf47bd00 Eeschema: avoid double entries after renaming to exisiting names
Also handles the case when the overwritten symbol is the current
one (i.e. select symbol Bar, then rename the unselected symbol
Foo to Bar).

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19709
2025-01-22 19:33:50 +08: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
eee28aa06a Clean up fields autoplacement control architecture.
Also adds a mode for AUTOADDED fields.

Also fixes a couple of bugs where a manual-level autoplaced
symbol would get reset back to auto-level when autoplaced.
2024-12-23 14:30:17 +00:00
John Beard
c55d7d6eb4 Sym edit: Also allow the 'edit in library' action to be a hotkey
Allows the user to easily 'upgrade' into a library edit action if
they choose the wrong one of Ctrl+E or Ctrl+Shift+E.

Increaes consistency with FP editing.
2024-10-31 23:15:48 +08:00
John Beard
1a2c84eb76 Eeschema: add 'place next unit' action
This makes a new symbol with the lowest unplaced
unit number and enters the PlaceSymbol action
(but only places that one unit)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18882
2024-10-27 05:13:24 +08:00
John Beard
ed8b2b050f Sym editor: add save as (like save copy as, but opens the copy)
This seems quite easy in sym edit, but not so straightforward
to add the reverse case in fp edit.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18371

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18902
2024-10-12 21:27:57 -06:00
John Beard
eae84fd5f3 Sym edit: add alt mode icon toggle
Moves the logic into the SCH_RENDER_SETTINGS, rather than
repeating it in EESCHEMA/SYMBOL_EDITOR_SETTINGS (they still
maintain their state there, but the painter looks at the
SCH_RENDER_SETTINGS).

Also turn them off for preview purposes.
2024-10-09 21:27:58 -06:00
John Beard
df5fe44839 sch_symbol.h doesn't need sch_lib_table.h
It doesn't even use the forward-declared
SYMBOL_LIB_TABLE.

Including this pulls in the whole richio system,
and sch_symbol.h is a very-included header.

Quite a few things do use SYMBOL_LIB_TABLE, but nowhere
near as many as use SYMBOL.
2024-10-04 18:06:18 +01:00
John Beard
ae96ac6d2e Sym edit: Add hidden field/pin toggle in settings panel
Actually add a whole new panel for symbol editor appearance control.

Use the SYMBOL_EDITOR_SETTINGS as the source of truth in a
couple more places, but the SCH_PAINTER settings are still
driving quite a bit here and there.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18830
2024-10-01 21:53:40 +01:00
John Beard
1effaf83c3 Sym edit: next/prev unit actions
Trivial small part of making large multi-unit symbol handling possibly a
little bit easier.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/9346
2024-10-01 18:06:26 +01:00
Tomasz Wlostowski
9963b9dd9f TOOL_INTERACTIVE: only create the context menu when we are running in GUI mode
TOOL_MENU::m_menu was unconditionally created by the TOOL_INTERACTIVE constructor, resulting in crashes if
we wanted to run the TOOLs in headless  mode, e.g. in unit tests. This commits makes
the creation of the menu object dependent on Pgm::IsGui().
2024-08-13 22:50:26 +02:00
aris-kimi
6969b9d64f Open library file preselected in the file explorer for both symbol and footprint editors. 2024-07-10 06:14:04 +00: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
Jeff Young
b5fb7b7ace Get rid of Export Symbol.
It can be done with the "New Library" button when doing
a Save copy as (which doesn't lead the user down the
wrong path as Export Symbol can).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17840
2024-04-28 22:05:59 +01:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Jeff Young
f51d227dc7 Default to target lib when no lib tree sel exists.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17808
2024-04-22 17:36:38 +01:00
Jeff Young
9c94967b52 Tidy renderSettings / jobsHandler APIs. 2024-04-08 12:26:56 +01:00
Jeff Young
5abc7145da Fold LIB_ITEM into SCH_ITEM. 2024-04-08 10:24:50 +01:00
Jeff Young
92910d5d0f Factor common parts of SCH_ & LIB_SYMBOL into SYMBOL. 2024-04-04 13:18:55 +01:00
aris-kimi
24529e5242 ADDED: library tree context menu option to open sym/fp library files from the defined text editor.
Short description:

Works for Symbol and Footprint Editor behind an advanced config option.
For Symbol Editor it is shown for a single item selection (library or symbol).
For Footprint Editor it is shown for a footprint selection.
(fp editor allows a single tree item selection only).
Option stays hidden if current frame has been modified.

Also small fix(?) for similar action to the project manager.
(Call for the Execution has moved inside the file loop.)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15736
2024-02-29 19:01:59 +00:00
jean-pierre charras
f7721f385a Symbol editor: add option (view menu+toolbar) to show/hide invisible pins and fields
Fixes #8020
https://gitlab.com/kicad/code/kicad/-/issues/8020
2024-02-25 16:09:50 +01:00
Jeff Young
ae735d3eb4 Renaming: replace convert with body-style.
No functional changes.
2024-01-26 16:21:03 +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
Jeff Young
78e00ade7a Clearer naming. 2023-11-09 14:05:35 +00:00
Jeff Young
14d6ff8946 Change Save Symbol As... to Save Symbol Copy As...
See details in the bug report.  (It's very complicated.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12504
2023-10-28 22:25:48 +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
Jeff Young
b592a6634e Cleanup. 2023-09-29 00:13:13 +01:00
Jeff Young
974da4ea7c Push most of DIALOG_CHOOSE_SYMBOL down into PANEL_SYMBOL_CHOOSER.
Includes a dialog wrapper (DIALOG_SYMBOL_CHOOSER) and a frame
wrapper (SYMBOL_CHOOSER_FRAME).
2023-09-29 00:13:12 +01:00
Jeff Young
948fea4be8 Nullptr safety. 2023-09-13 23:34:25 +01:00
Jeff Young
7d1dbb77c3 Update symbol editor's title bar when renaming the canvas symbol. 2023-09-12 16:52:47 +01:00
Jeff Young
ee724f6a2b Only update value on rename if it previously matched the symbol name.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15621
2023-09-12 16:52:47 +01:00