202 Commits

Author SHA1 Message Date
John Beard
f7b3e05f22 Sym editor: button to save editable copy when in read-only lib
Not a full solution to the following issue, as it won't ofter
to update any symbols used in the current schematic, but it's
a start.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18370
2024-10-14 21:52:35 +08:00
John Beard
47aae7d06b Add a link to the lib when editing a schematic symbol 2024-10-14 20:36:26 +08:00
John Beard
047fae0f1f Sym editor: add infobar message in read-only libs 2024-10-14 20:36:26 +08:00
John Beard
b0043587c2 Add 'Copy as Text' action
This is useful when you want to copy text content out to some
external program (or put it in a text item/box).

I'm not sure it's possible to intuit exactly what a user wants,
as you will often want to copy items as the real items, and sometimes
as text. While KiCad might be able to make a smart guess, external
programs will have no chance!
2024-10-13 20:47:45 +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
Mike Williams
bfae4a99a4 editors: block paste while in tool in schematic/sym/page layout
PCB and footprint editors were already blocking this. Otherwise we would
get weird issues when pasting while drawing things like sheets or
textboxes that aren't selected while drawing.
2024-10-07 10:50:49 -04:00
JamesJCode
64c24fc04b UI consistency improvements 2024-10-02 19:44:48 +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
John Beard
109675f39e Eeschema: add bezier tool
This is a little more primitive than the pcbnew tool,
in the same way that the arc tool is also more primitive
(no interactive manager).

It works just about well enough to get the curves drawn,
but all these tools could do with some interactivity
in esschema and symbol editor.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8828
2024-09-25 22:09:32 +01:00
John Beard
69889eff7c SYMBOL_LIBRARY_MANAGER: Enforce non-null via reference
All code paths in CreateLibrary and AddLibrary check that
the LIB_TABLE is non-null first.
2024-09-19 06:35:43 +01:00
Jeff Young
3441861988 Make arrow keys respect grid overrides. 2024-08-28 19:54:23 +01: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
jean-pierre charras
2a37580839 Symbol editor: ensure the left panel is correctly refreshed when hiding a pane. 2024-06-11 17:48:25 +02: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
ed0869aa0c Share more library tree code. 2024-06-08 19:06:10 +01:00
jean-pierre charras
1322e0bc73 symbol editor: allows rotation of fields in derived symbols.
Fields in derived symbols are editable, so the context menu must allow rotations.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18003
2024-05-31 17:32:31 +02:00
Alex Shvartzkop
5475359d00 More build time optimizations. 2024-05-06 04:39:28 +03: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
3781682a89 We don't need to flip Y of fields anymore. 2024-05-03 13:31:15 +01:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Jeff Young
95136494b3 RIP LIB_PIN. 2024-04-20 12:10:31 +01:00
Jeff Young
3efe504dcc Collapse LIB_TEXT into SCH_TEXT. 2024-04-16 16:31:16 +01:00
Jeff Young
d77eae3e7e Collapse LIB_FIELD into SCH_FIELD. 2024-04-13 15:42:13 +01:00
Marek Roszko
0675c62a24 Update two more lambda capture 2024-04-12 22:42:31 -04: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
jean-pierre charras
c27eade01e Symbol Editor: do not allow to select fully invisible pins and fields
Of course, invisible pins or fields shown by using option Show invisible
pins or Show invisible fields can be selected.
2024-03-14 10:01:58 +01:00
Jon Evans
1600d8bead Prevent use-after-free of symbol screens
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17204
2024-03-05 22:53:51 -05:00
Marek Roszko
0c8e08ed58 Move some language changes to a event on the frame 2024-03-03 11:02:26 -05:00
Jon Evans
2f6c9d1f3a ADDED: Selection filter for schematic editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14988
2024-02-25 17:44:10 -05: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
e760317af6 ADDED: Implement footprint link checking in ERC.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16842
2024-02-24 20:05:51 +00:00
Jeff Young
bce372c8a3 Don't clear the undo/redo list when we're just trimming it.
We only allow a certain number of commands on the lists
and trim them when they overflow.  PCB_BASE_EDIT_FRAME and
PL_EDITOR_FRAME implemented this correctly; SCH_EDIT_FRAME
and SYMBOL_EDIT_FRAME did not.
2024-02-07 14:52:10 +00:00
Jeff Young
ae735d3eb4 Renaming: replace convert with body-style.
No functional changes.
2024-01-26 16:21:03 +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
Ian McInerney
4eaa0242ca Collapse schematic/symbol graphics import to single action
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16463
2023-12-29 02:57:21 +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
Jon Evans
7470ec80e4 Fix some issues with Font property
Prevent out-of-bounds access
Make sure list is initialized in symbol editor frame
Don't re-init the list more frequently than necessary

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16399
2023-12-22 18:34:48 -05:00
Jeff Young
a4a946ab75 Clearer naming. 2023-11-17 18:36:33 +00: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
Wayne Stambaugh
30ba1b8007 Coverity warning fix.
This fixes all of the warnings cause by using std::weak_ptr objects when
recursing the symbol inheritance tree to retrieve the root symbol.  The
issue is that the weak pointers are not guaranteed to be valid for each
recursion because the lock will go out of scope.  Using a std::shared_ptr
object will ensure the lock is valid until it goes out of scope.
2023-10-28 13:25:30 -04:00
jean-pierre charras
5bf241a53e Pcbnew, export component placement: better string in menu (.gbr added).
Also fix 2 minor Coverity warnings.
2023-10-25 09:41:08 +02:00
Wayne Stambaugh
b5eee9dd7e Coverity warning fixes. 2023-10-16 17:04:14 -04:00
Alex Shvartzkop
60d069757a ADDED: Import vector graphics into Symbol editor (SVG, DXF). 2023-10-09 07:04:50 +03:00
Marek Roszko
8c6899b0d3 Tear out the eeschema conditional compile of PROJECT 2023-09-27 23:05:30 -04:00