119 Commits

Author SHA1 Message Date
Jeff Young
b8819b4636 Another reduction in asserts. 2024-07-19 22:11:56 +01:00
Jeff Young
ed0869aa0c Share more library tree code. 2024-06-08 19:06:10 +01:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Jeff Young
d77eae3e7e Collapse LIB_FIELD into SCH_FIELD. 2024-04-13 15:42:13 +01:00
Marek Roszko
e6be29daa0 Fix another UTF8 to wxString comparison 2024-04-12 22:38:38 -04:00
Jeff Young
5abc7145da Fold LIB_ITEM into SCH_ITEM. 2024-04-08 10:24:50 +01:00
Yon Uriarte
e824e5a267 Compiler warning: C4555 result of expression not used 2024-03-09 17:11:38 +00:00
Jeff Young
fb8f05fb34 Correctly report body style in symbol checker.
Also fixes a bug where off-grid pin locations were truncated.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16770
2024-01-26 18:11:23 +00:00
Jeff Young
ae735d3eb4 Renaming: replace convert with body-style.
No functional changes.
2024-01-26 16:21:03 +00:00
Seth Hillbrand
4e3d2a148d Fix typo 2024-01-12 14:51:32 -08:00
Seth Hillbrand
2aab24ef29 Prevent multiple reloads when saving
Avoid potential issues with Mac libedit crashes (hopefully)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14865
2024-01-11 19:01:31 -08: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
85f62c1fde Rename all schematic IO plugins 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
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
afkiwers
dc8a5865d5 Symbol Editor: SCH_HTTP special treatment
Added SCH_HTTP to receive special treatment, same like with database libraries!
2023-10-22 19:37:43 +00:00
Jeff Young
d5d07e64c9 Use IsShownOnScreen(), not IsShown(), if you really want to know if its visible. 2023-10-14 23:51:37 +01:00
Marek Roszko
8c6899b0d3 Tear out the eeschema conditional compile of PROJECT 2023-09-27 23:05:30 -04:00
Jeff Young
1fd3f4e375 Handle read-only libraries when saving symbol from canvas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15519
2023-09-23 14:34:54 +01:00
Jeff Young
849a4656c8 Check value-follows-name case in symbol Save As.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15647
2023-09-14 23:56:05 +01:00
Alex Shvartzkop
ff49d5ada9 Fix ambiguous overloads on wx 3.3 2023-09-14 19:05:46 +03: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
634524dde5 Validate new symbol / save as symbol info before exiting dialog. 2023-09-05 22:07:58 +01: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
Wayne Stambaugh
1026596964 Allow symbols to be derived from other derived symbols.
[CHANGED] Symbols can now be derived from other derived symbols removing
          the requirement to derive from root symbols.
2023-08-24 07:59:32 -04:00
Seth Hillbrand
db8e15ce88 Require wxWidgets 3.2
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00: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
Jon Evans
d4b7144448 Properties: expose symbol attributes
Flip polarity of exclude-from-BOM and -board for symbols
to match that of footprints and match the GUI display.
2023-06-24 22:03:06 -04:00
jean-pierre charras
9447c3d455 symbol editor: fix issue after loading a symbol from a library.
Selected items become invisible.
(similar to the issue fixed by commit b622e3a3f7597b5812fb3655c0ce40410f80db46)
Fixes #14151
https://gitlab.com/kicad/code/kicad/issues/14151
2023-06-18 17:17:16 +02:00
Ian McInerney
d96580c651 Properly handle improper symbols when pasting in symbol editor
Before, an improper symbol (one without the starting toekn) weren't
detected and reported to the user properly and would instead assert. Now
properly detect these and pass the error up the stack to the tool.

(Sentry issue KICAD-21J).
2023-06-12 23:14:56 +01: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
jean-pierre charras
f2f014a27c Symbol editor: ensure a new derived symbol has the correct DeMorgan option displayed.
Derived symbols use the same graphics as their parent, so ensure the parent is
used to enable/disable the DeMorgan option and tool in toolbar
Fixes #13739
https://gitlab.com/kicad/code/kicad/-/issues/13739
2023-05-27 10:13:43 +02:00
Jeff Young
05185ec81a Save library when it's selected in lib tree.
Fixes https://gitlab.com/kicad/code/kicad/issues/14220
2023-04-14 17:35:37 +01:00
Roberto Fernandez Bautista
e8ead30baf WIP: CADSTAR Parts now shows up in library tables and is handled correctly (todo: read cadstar header) 2023-03-16 21:07:05 +01:00
Chris Morgan
80b55f5980 Symbol editor: simpler creation of a new derived symbol
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13407
2023-02-22 01:49:46 +00:00
Jon Evans
955a5a13eb Symbol editor: stop removing overlay from view
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13944
2023-02-16 08:17:12 -05:00
Marek Roszko
0ff32d20cd wxS more things 2023-01-22 09:41:42 -05:00
Jon Evans
dee4f80680 DbLib: Load source symbol in editor when edit action is taken
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12840
2023-01-19 22:45:46 -05:00
Jeff Young
4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +00:00
Seth Hillbrand
a0aff2dc70 Set the proper symbol parent when duplicating
We need to handle both the case where the new symbol is an alias as well
as free the proper memory after loading symbols in the duplicate

Fixes https://gitlab.com/kicad/code/kicad/issues/12578
2022-10-05 09:46:13 -07:00
Jon Evans
2089374f53 ADDED: Export symbols from schematic to library
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11433
2022-09-23 21:23:01 -04:00
Jon Evans
da9be1a812 ADDED: Multi-selection cut/copy/paste in symbol editor library tree
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11505
2022-09-14 22:20:38 -04:00
Jon Evans
8694c37376 Remove requirement that non-power symbols share a name and value
There is no technical reason for this restriction for non-power symbols, so let's remove it.
This will allow more flexibility and compatibility with other tools.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9389
2022-08-20 17:43:43 -04:00
jean-pierre charras
993c446fdf Fix some warnings detected by PVS-STUDIO (most are not used vars) 2022-07-25 18:23:52 +02: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
Marek Roszko
08dbc3a53c Move the symbol editor to the new filedlg customize 2022-06-11 22:59:59 -04: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
Jeff Young
84f620a96e Minor dialog beautification. 2022-04-19 19:55:30 +01:00