Commit Graph

9437 Commits

Author SHA1 Message Date
Jeff Young cb58cb8cd3 Put new lines and junctions on the right layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/13505
2023-01-12 15:17:45 +00:00
Jeff Young d839f11d49 Rip out parsing of SPICE libraries for netlisting.
We only need to parse the libraries for the Sim Model Editor dialog
(so that we can determine the models to put in the popup).  Doing it
for netlisting just opens us up to incorrectly parsing the SPICE, and
returns no value.

This also means that a SIM_LIB_MGR manages a single library, and
never multiple libraries.

This also allows the tidying-up of some error reporting structures to
better inform the user what went wrong.

Fixes https://gitlab.com/kicad/code/kicad/issues/13431
2023-01-12 14:51:03 +00:00
Seth Hillbrand d07da51390 Fix copy-paste error 2023-01-11 20:37:42 -08:00
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Seth Hillbrand f4ac4be701 Fix naming of `updateTitle()`
This is a private function so should be lowercased to avoid confusion
2023-01-11 16:06:20 -08:00
Seth Hillbrand 8aff923710 Set dirty bit and handle undo for export remap
When remapping the exported symbols, we should keep this in the undo
stack (remapping, not the existence of the new elements) and set the
dirty bit for the file to ensure it is saved/autosaved

Fixes https://gitlab.com/kicad/code/kicad/issues/13493
2023-01-11 16:06:20 -08:00
Jeff Young c3c5468817 Sort all findNext candidates in a single list.
Fixes https://gitlab.com/kicad/code/kicad/issues/13483
2023-01-11 23:42:45 +00:00
PJM 76a0d4c4c0 Eeeschema: Fixed logic to display unamed pins properly
CHANGED:  This code previously checked "m_name.IsEmpty()" to choose the
correct formatting path, but that check fails if the pin is called "~"
which is the default for an empty pin name.  Instead we get the final
display string that will be shown and check if it's empty.

Fixes https://gitlab.com/kicad/code/kicad/issues/13332
2023-01-11 21:45:32 +00:00
Seth Hillbrand a206f6717d Desaturate the symbols in DNP for print/plot
The desaturation should match screen display

Fixes https://gitlab.com/kicad/code/kicad/issues/13481
2023-01-11 13:44:08 -08:00
Graham Keeth 89a6e55e58 Add DNP columns/grouping info to BOM script headers 2023-01-11 20:42:44 +00:00
Seth Hillbrand 248399f771 Standardize print/plot terms
Use choice box for color/bw selection
"border and title block" -> "drawing sheet"

Fixes https://gitlab.com/kicad/code/kicad/issues/13128
2023-01-11 12:30:02 -08:00
Seth Hillbrand 8a26bf6c41 Tweak DNP display settings
Use ERC error color
Make lines 3 * default line width (instead of 4 *)
2023-01-11 11:29:46 -08:00
Wayne Stambaugh c7ffb85bf7 Fix Eagle schematic import on duplicate symbol library names.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13434
2023-01-11 14:10:00 -05:00
Jeff Young c89925578d Move find/replace to own tool so it doesn't rob events from cross-probing. 2023-01-11 14:22:06 +00:00
Dag Lem bc4e559581 Eagle schematic import: Corrected handling of curved symbol/wire 2023-01-11 12:31:46 +00:00
Jeff Young f8ef15f174 Fix over-zealous delete.
Fixes https://gitlab.com/kicad/code/kicad/issues/13476
2023-01-11 12:16:28 +00:00
Jeff Young 30c9deb9d5 Flat(er) look for paged dialogs. 2023-01-11 01:11:25 +00:00
Seth Hillbrand 6cd750bb9c Respect "Exclude from Board" flag in export
When exporting to board-based netlists, skip components marked for
exclude from Board

Fixes https://gitlab.com/kicad/code/kicad/issues/13422
2023-01-10 15:23:26 -08:00
Seth Hillbrand 786fc14df3 Explicitly call out DNP in BOM
Add DNP column and group output based on DNP

Fixes https://gitlab.com/kicad/code/kicad/issues/13466
2023-01-10 15:23:26 -08:00
Seth Hillbrand 3003d9476a Respect exclude from BOM
Remove non-standard (and hidden) exclude from BOM field in favor of the
current standard flag
2023-01-10 15:23:26 -08:00
Roberto Fernandez Bautista 33249d37b0 EAGLE SCH: Improve detail of curved shape imports (0.01mm error)
Follow-up from https://gitlab.com/kicad/code/kicad/-/merge_requests/1445
2023-01-10 22:45:46 +01:00
Roberto Fernandez Bautista 99d02ac7c0 CADSTAR SCH: Load symbol shapes with correct fill state
Changes architecture of importer to use SHAPE_LINE_CHAIN.

For now lets just load symbol shapes like this, but we could update code
for all other loading operations (also in PCB).

FIxes https://gitlab.com/kicad/code/kicad/-/issues/8060
2023-01-10 22:28:01 +01:00
Dag Lem 7e01816b73 Eagle schematic import: Handling of polygons with curved sides 2023-01-10 20:45:40 +00:00
Wayne Stambaugh 366c3e7142 Revert "Fix value field visibility issues when importing Eagle schematics."
This reverts commit 4c5203fabf.
2023-01-10 09:45:18 -05:00
Seth Hillbrand f99e374559 Make DNP more visible
Adds red cross to the DNP display.  Allows showing the DNP even when
plotting black/white

Fixes https://gitlab.com/kicad/code/kicad/issues/13456
2023-01-09 15:31:50 -08:00
Dag Lem 7c458c5aee Eagle schematic import: Handling of curved plain/wire and segment/wire 2023-01-09 17:02:14 +00:00
Mike Williams 4274bd0bb7 Schematic: handle rotations that include junctions
Also fix lack of line cleanup on mirroring.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13436
2023-01-09 11:05:30 -05:00
Wayne Stambaugh 4c5203fabf Fix value field visibility issues when importing Eagle schematics.
Eagle schematics do not show the value field when it's not defined or
when not package (footprint) is defined for the symbol which is the
case for power symbols.  Don't show the value field in KiCad to bring
the view more in line with what Eagle displays.

Inspired by Stefan's merge request #13433.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13433
2023-01-09 10:45:45 -05:00
Jeff Young c43050b91b Remove safety around reading default parameter from Value field.
This should be OK now because we should be writing out all parameters
now (even if they're default value).

But perhaps more to the point, if we have the safety in there then
we miss cases where we really can't parse the model (value of "{VCC}")
and we need to fall back to a raw spice model.

Fixes https://gitlab.com/kicad/code/kicad/issues/13444
2023-01-09 15:24:45 +00:00
jean-pierre charras be5810a1ce EEschema, "Change To" context menu: do not allow converting SCH_SHEET_PINs
to something else.
SCH_SHEET_PIN are specific, handled by a SHEET, and the conversion to a label
cannot be done.
2023-01-09 15:30:36 +01:00
Dag Lem 8c8b4f43e7 Eagle schematic import: Added missing plain elements 2023-01-09 14:18:23 +00:00
Marek Roszko 9f71e9af03 Add arg to plot hidden symbol pins in cli 2023-01-08 22:39:38 -05:00
Marek Roszko c514f6f094 Handle alias symbols in cli svg export 2023-01-08 22:19:06 -05:00
Wayne Stambaugh 9c0445ed98 Remove schematic editor standard dialog button static line separators. 2023-01-08 14:26:10 -05:00
Jeff Young d65cf1b457 Check parameters before assuming we can handle the model.
Fixes https://gitlab.com/kicad/code/kicad/issues/13444
2023-01-08 18:00:22 +00:00
Jeff Young 063478b3dc Implement brightening for Find Next hotkey actions.
Fixes https://gitlab.com/kicad/code/kicad/issues/13421
2023-01-08 14:34:38 +00:00
jean-pierre charras 4d5c4c4ea8 Ensure all selected items have their edit flags cleared after move.
Some sub-items like fields can be selected, and are not in the main item list.
Fixes #13435
https://gitlab.com/kicad/code/kicad/issues/13435
2023-01-08 11:52:21 +01:00
Jeff Young c3ca1ce014 Tune the hit-test extra-slop for lines (and apply it to arcs too).
Fixes https://gitlab.com/kicad/code/kicad/issues/13429
2023-01-07 23:06:51 +00:00
Jeff Young ee0e90e3b0 We no longer enforce either a non-empty value or name == value.
Fixes https://gitlab.com/kicad/code/kicad/issues/13424
2023-01-07 22:42:52 +00:00
Jeff Young 22144ae0d0 Fix bogus format string replacement type.
Fixes https://gitlab.com/kicad/code/kicad/issues/13426
2023-01-07 19:34:32 +00:00
Jeff Young 289d9bd6fb Remove missed check for empty fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/13424
2023-01-07 19:34:32 +00:00
jean-pierre charras c2f7dbfc15 Eeschema, AlignElements(): fix broken align of lines (bus, wire, graphic line)
It was due to a recent change (commit d824b7f5)  for SCH_LINE_T in
SCH_MOVE_TOOL::moveItem()
2023-01-07 09:06:03 +01:00
Seth Hillbrand 03e12535a8 Include symbol flags in swap
Needed for undo/redo.  All properties should be listed in the swap

Fixes https://gitlab.com/kicad/code/kicad/issues/13409
2023-01-06 14:40:39 -08:00
Jeff Young 8dc7baad3d Cleanup actions should not activate tools. It causes all manner of side-effects.
Fixes https://gitlab.com/kicad/code/kicad/issues/13331
2023-01-06 22:15:20 +00:00
Seth Hillbrand 8cabc82f1c Add highlight hinting to pin severity 2023-01-06 13:30:58 -08:00
Jeff Young 5bdc3a5721 Keep sim-enabled checkbox in sync with edits to fields grid. 2023-01-06 20:43:33 +00:00
Wayne Stambaugh 411669ab88 Fix schematic power symbol annotation paste bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13405
2023-01-06 13:55:13 -05:00
Seth Hillbrand 38a0b67e40 ngspice has specific chars that are reserved
This replaces all known reserved characters with '_'

Fixes https://gitlab.com/kicad/code/kicad/issues/13404
2023-01-06 09:36:49 -08:00
Jeff Young 4d7642a26c Add number of pulses parameter to pulsed voltage/current sources.
Also don't suppress writing "0" valued parameters.

Fixes https://gitlab.com/kicad/code/kicad/issues/13401

Fixes https://gitlab.com/kicad/code/kicad/issues/13402
2023-01-06 13:45:56 +00:00
Marek Roszko c57e6db79a Turn off plotting hidden fields in the svg export cli 2023-01-05 23:32:24 -05:00
Marek Roszko e056c96c10 Feed the sym svg export absolute paths for source lib 2023-01-05 22:28:01 -05:00
Seth Hillbrand b6b5a8ef6e Remove bus label syntax from severities dialog 2023-01-05 17:00:32 -08:00
Jeff Young 98f0959f39 Default common-to-all-units based on last-used setting.
(Or whether or not the symbol has interchangeable units when a new
symbol is loaded.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13391
2023-01-06 00:34:16 +00:00
Seth Hillbrand c29dfe026e Force recursing annotation when set to auto
Automatic annotation should always annotate new elements regardless of
where in the hierarchy they are

Fixes https://gitlab.com/kicad/code/kicad/issues/13378
2023-01-05 15:03:38 -08:00
Jeff Young 933a5d45e1 Be more aggressive about clearing edit flags after operations.
Fixes https://gitlab.com/kicad/code/kicad/issues/13173

Fixes https://gitlab.com/kicad/code/kicad/issues/13385
2023-01-05 18:08:22 +00:00
Jeff Young 7af718f1a5 Don't use std::string for things with wxString APIs.
It's too bug-prone.

Fixes https://gitlab.com/kicad/code/kicad/issues/13380
2023-01-05 14:16:39 +00:00
Jeff Young 3b021d98be Completely remove reading SCH grid sizes from config files.
It messes up too many things if you put metric grids in there.

Fixes https://gitlab.com/kicad/code/kicad/issues/13345
2023-01-05 12:25:43 +00:00
Stefan c5d7e447c7 Bugfix: remove trailing comma after last ref 2023-01-05 08:29:01 +00:00
Jeff Young 985414fef9 Collapse pin-conflicts-map generator back to (mostly) a single path. 2023-01-05 00:02:44 +00:00
Wayne Stambaugh 6f7af062ff Rename file component_reference_lister.cpp to sch_reference_list.cpp.
This matches the naming of the header file.
2023-01-04 16:31:17 -05:00
Seth Hillbrand 0e2943d781 Fix pinmap flat style on GTK 2023-01-04 12:48:15 -08:00
Wayne Stambaugh d99e09014b Rename SYMBOL_INSTANCE_REFERENCE to SCH_SYMBOL_INSTANCE. 2023-01-04 15:39:50 -05:00
Seth Hillbrand fc86998bf6 Ensure duplicate pin names get unique nets
Same pin name != same net name unless the pins are explicitly connected

Also add pin number to all unconnected pads ensuring they have unique
nets

Fixes https://gitlab.com/kicad/code/kicad/issues/13236
2023-01-04 11:32:15 -08:00
Jeff Young 7c0b6c1e87 Restore old pin-conflicts-map algo for MSW and GTK. 2023-01-04 18:32:06 +00:00
Mike Williams bd5d10cd7b Schematic: remove more extraneous dangling symbols 2023-01-04 11:07:23 -05:00
Graham Keeth fb9a388bce Fix icon spacing in Annotation dialog/panel 2023-01-04 13:52:19 +00:00
Jeff Young 33d31be9b5 Fix last commit. 2023-01-04 13:38:28 +00:00
Jeff Young b38370adae Test for viability of using fontsize for pin conflicts map positioning. 2023-01-04 13:16:15 +00:00
Wayne Stambaugh f5c5b00e40 Fix schematic annotation dialog bitmap layout issue. 2023-01-04 07:36:00 -05:00
Wayne Stambaugh 73b7dcbc35 Attempt to unify symbol annotation behavior between place and paste.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13330
2023-01-04 07:36:00 -05:00
jean-pierre charras 575a84f76c Fix a compil issue on GTK 2023-01-04 13:15:56 +01:00
jean-pierre charras d0f9ce897e Do not use #elifdef , only available in C++23
replaced by #elif defined
2023-01-04 11:59:33 +01:00
Jeff Young a8d2f7f71d Round 2 for GTK. 2023-01-04 01:41:07 +00:00
Jeff Young b9f1106781 Adjustments for GTK. 2023-01-04 01:18:02 +00:00
Jeff Young c47de5a55d Another round of adjustments for MSW pin conflicts map. 2023-01-04 00:33:58 +00:00
Jon Evans ac3ed02283 Rework bitmap cache and enable it
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12405
2023-01-04 00:26:45 +00:00
Marek Roszko 8ab9934143 Use our own cmake module path variable to avoid conflicting with the main ones listy functional 2023-01-03 19:18:16 -05:00
Jeff Young 7d84d323a6 Pin conflicts map adjustments for MSW. 2023-01-04 00:12:16 +00:00
Jeff Young 13d196c509 Fix some issue in the pin conflicts map with button alignment on Mac.
Fixes https://gitlab.com/kicad/code/kicad/issues/13333
2023-01-03 23:39:48 +00:00
Graham Keeth 77ee82459e add ERCE_NETCLASS_CONFLICT and ERCE_ENDPOINT_OFF_GRID to schematic setup 2023-01-03 23:23:46 +00:00
Mike Williams 1ba9a6abe3 Rotate/Mirror: unbreak immediate mode actions 2023-01-03 16:05:52 -05:00
Seth Hillbrand cbe6cd3048 Don't move local vars
Copy ellision allows optimization if we don't explicitly move a local
variable in the return
2023-01-03 10:20:18 -08:00
Jeff Young baa13b885f Don't add Sim.Params unless it contains data, and update sallen key demo. 2023-01-03 17:20:23 +00:00
Jeff Young 9583b28063 Fix store-in-value bugs.
1) Always honour the dialog checkbox value.
2) Don't expect the absence of the primary parameter in Sim.Params to
   mean that Value stores it.  It might be the default parameter value.
3) Update spiceTypeInfo when matching legacy data to an internal model.
4) Initialize the store-in-value checkbox depending on whether or not
   we found the primary parameter in the Value field.
2023-01-03 17:20:23 +00:00
Jeff Young 9b9795a87d Reduce reliance on exception processing -- it's waay too bugy at present.
This moves some stuff to REPORTER APIs.  Moving more stuff would be good,
but it probably too high-risk at present.  We'll wait for 8.0 for that....

Fixes https://gitlab.com/kicad/code/kicad/issues/13359
2023-01-03 17:20:23 +00:00
Mike Williams d1c2ab957b Schematic: set current sheet after initializing screens
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13238
2023-01-03 12:11:31 -05:00
Jeff Young fdc8f9c59d Fix accidental deletion in "TEXT_ATTRIBUTES" commit. 2023-01-03 01:23:18 +00:00
Jeff Young 7f35323416 Re-enable sim model ERC testing. 2023-01-03 00:59:14 +00:00
Jeff Young 056349e5ea Units for footprint preview widgets. 2023-01-02 22:12:26 +00:00
Jeff Young c5948de2af Update find status when switching sheets.
(Not just when switching sheet during find.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13351
2023-01-02 18:49:28 +00:00
Jeff Young 277cd73204 TEXT_ATTRIBUTES doesn't hold the position.
Fixes https://gitlab.com/kicad/code/kicad/issues/13350
2023-01-02 17:36:21 +00:00
Jeff Young fc346ea794 Iterator safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/13341
2023-01-02 11:36:54 +00:00
jean-pierre charras e8114dc49a Minor compil and Coverity warnings fixes. 2023-01-02 10:21:42 +01:00
Jeff Young 6f16678d2d Typo fix courtesy or aris-kimi. 2023-01-01 23:40:18 +00:00
jean-pierre charras 447d0d71d3 EEschema, Error/Info messages: do not add the unit id to single unit symbol ref 2023-01-01 11:21:05 +01:00
Gary Kim 8e8a3c7bdc
Do not translate name in version info
Leave the application name in version info untranslated when
viewed, copied, or used in a bug report.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13298
2022-12-31 20:28:45 -05:00
Jeff Young 62f0843579 Fix grammar error in warning string. 2022-12-31 18:54:36 +00:00
Jeff Young 55b8f0bc00 Gracefully fall back to raw spice when we can't parse the data.
Fixes https://gitlab.com/kicad/code/kicad/issues/13329
2022-12-31 18:52:26 +00:00
Jeff Young 77b361a077 Add reference material to SPICE model pin assignment tab.
Fixes https://gitlab.com/kicad/code/kicad/issues/13309
2022-12-31 18:52:26 +00:00
jean-pierre charras 9f56771611 Fix a typo 2022-12-31 11:41:04 +01:00
Jeff Young 5deee405da Fill in built-in-model-type (which might not be the same as initial spice type).
Fixes https://gitlab.com/kicad/code/kicad/issues/13324
2022-12-31 01:07:46 +00:00
Jeff Young 62bec69d8c Migrate field text attrs from legacy fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/13323
2022-12-30 23:41:46 +00:00
Jeff Young e9ed56e9a4 Fix small alignment issue in field properties dialog. 2022-12-30 15:29:36 +00:00
Jeff Young c0e0cbceb0 Move eseries helper class to common.
Also improves some terminology for english-speakers.

Also substitues [] vector access (which creates empty elements) over
at() (which throws if the item is not found).
2022-12-29 18:05:57 +00:00
Jeff Young 4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +00:00
Mike Williams 068b714908 Schematic: merge dual import sheet pin actions
I believe I have managed to keep the slightly distinct functionality of
both implementations: the action will now use the selected sheet or find
one under the cursor if it's there.

It will also keep placing pins while they exist, which was inconsistent
in the behavior of the single click version before (other single click
commands keep placing until you cancel, e.g. no-connects )

Also, it will automatically end the tool when it runs out of sheet pins.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13296
2022-12-29 09:36:29 -05:00
Mike Williams e65de51fc7 Schematic: label auto orientation needs to respect move/drag/change
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13226
2022-12-28 14:30:57 -05:00
Mike Williams 495f337fa5 Schematic: remove unused variable 2022-12-28 12:27:57 -05:00
Mike Williams 6816ee937a Flags: remove unused IS_DRAGGING 2022-12-28 12:27:57 -05:00
Mike Williams 6cc17e4a16 Schematic: new flag IS_BROKEN for trimming BreakSegment danglers 2022-12-28 12:27:57 -05:00
Mike Williams f03fd5ad2d Schematic: remove IS_RESIZING
Is unused/redundant with IS_MOVING
2022-12-28 12:27:57 -05:00
Mike Williams 13f67aa7ce Schematic: remove unnecessary drag mirror/rotate control disabling
The whole edit dialog is blocked while dragging if anything else is drag
selected, and if nothing is drag selected the rotations/mirroring will
be fine. Also, we already allow mirror and rotate while dragging, using
the keyboard shortcuts and menu items, and it works fine.
2022-12-28 12:27:57 -05:00
Mike Williams b5b65e1455 Schematic: update dragged lines dangling state in realtime
Makes the visuals a little nicer as we add bend lines
2022-12-28 12:27:57 -05:00
Jeff Young e7300ffb5c Improved column sizing in library setup dialogs. 2022-12-28 16:27:03 +00:00
Jeff Young e927328ecf Don't rely on field ID for intersheetrefs.
It will be -1, for instance, after a duplicate.
2022-12-28 15:15:54 +00:00
Jeff Young a3fcc8bbf7 Move Exclude from Simulation to Symbol Properties.
Also brings the layout of Symbol Properties for Symbol Editor more in
line with Symbol Properties for Schematic Editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/13299
2022-12-28 13:44:13 +00:00
Jeff Young 87448e0c55 Include sim command when running external SPICE.
Fixes https://gitlab.com/kicad/code/kicad/issues/13295
2022-12-28 12:28:22 +00:00
Jeff Young d50b3550af Signals header is repetitive. 2022-12-28 10:40:23 +00:00
Jeff Young ef6001bfe6 Use consistent terminology: opposite of Add is Remove.
Note: violating string freeze because this change should ease translation,
not make it harder.
2022-12-28 10:40:23 +00:00
Jeff Young e11d39b0f2 If magnitude or phase is specified, don't add both.
Fixes https://gitlab.com/kicad/code/kicad/issues/13202
2022-12-28 10:40:23 +00:00
Jeff Young 508b9e21a8 Put simulation in with other life-cycle tools. 2022-12-28 10:40:23 +00:00
Jeff Young 3767716f20 Menu IDs of 0 don't work on Mac. 2022-12-28 10:40:23 +00:00
Jeff Young 987eb4b46a Handle language changes for Schematic Hierarchy Navigator.
Fixes https://gitlab.com/kicad/code/kicad/issues/13291
2022-12-28 00:11:28 +00:00
Mike Williams f1fab140a1 Schematic: make menu bar rotation items conditional
Also fix some items not getting a context menu rotate action.
2022-12-27 14:18:47 -05:00
Jeff Young 0b50e7fa37 A wee little hack for intersheet refs in legacy files.
Fixes https://gitlab.com/kicad/code/kicad/issues/13108
2022-12-27 18:46:58 +00:00
Mike Williams 8ca8f83a18 Schematic: sheet pin dragging special case needs to check endpoints
Otherwise we'll force the wrong end of a line to be special-cased
2022-12-27 12:15:49 -05:00
Mike Williams 33b774685b Schematic: fix inconsistent selected-by-drag behavior of mid-line labels
Two issues here:

Selected labels would half of the time add junctions splitting lines
when the lines would have been selected-by-drag (removing the need for a
junction).

Split lines aren't selected by drag by default, and we need to test
labels against lines that are selected by drag.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13224
2022-12-27 12:15:49 -05:00
Mike Williams b82833200a Schematic: correct bus entry shadows size and selections 2022-12-27 10:09:45 -05:00
Jeff Young e64b356d93 Fix broken if/then/else logic.
Fixes https://gitlab.com/kicad/code/kicad/issues/13192
2022-12-27 14:58:10 +00:00
Mike Williams 1ad373f2b2 Schematic: don't show unselected ends on bus entries 2022-12-27 09:37:21 -05:00
Jeff Young 572c10b2c4 If we don't recognize a var then it's an error, not 0.0. 2022-12-27 13:50:44 +00:00
Jeff Young 39a23fa9bc Only eval numeric properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/13201
2022-12-27 13:50:44 +00:00
Wayne Stambaugh e68bb16a28 Fix Eagle schematic import debug assertion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13215
2022-12-27 08:31:56 -05:00
Jon Evans 314c813aca Don't try to save hierarchical sheets with empty filenames
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11236
2022-12-26 21:47:17 -05:00
Jeff Young 80f3abe082 Event safety.
Sentry crash probably happens when an update title event fires either
too early or too late to have a simulator or simulator settings.

Sentry issue https://sentry.io/organizations/kicad/issues/3669444623/events/fce0179f7d5e4ff3a7dbb0d90a0570b4/
2022-12-26 20:33:04 +00:00
Jeff Young 424cdf6699 Overflow safety.
Sentry issue https://sentry.io/organizations/kicad/issues/3419671947/events/11212297e66c47c7af7144b5f075e88c/
2022-12-26 20:33:04 +00:00
Wayne Stambaugh 78e2f0fd4d Sheet instance handling improvements. 2022-12-26 08:30:03 -05:00
Jeff Young b070ecf0c7 Don't run simulation while dragging tuning slider.
It has all manner of issues with wxWidgets event processing.  The
primary one that Kicad stumbles over is that there is no kill-focus
when the mouse leaves the thumb if the sim is running, so subsequent
mouse-up events (even if in another window) generate thumb scrolls.
Another one that gets us is scroll events being generated when the
window is fronted, but this may be debugger-specific.

Fixes https://gitlab.com/kicad/code/kicad/issues/11366
2022-12-26 10:51:30 +00:00
Jeff Young 90edcc8c42 Clarity and Clang-tidy warnings. 2022-12-26 10:51:30 +00:00
Jeff Young 13b73ed6b4 Remember dialog sizes for dialogs that might have lots of fields.
This is mainly for simulation testing where the dialog has to be
grown every time you restart the app, but it might as well be applied
to the similar dialogs.

Fixes https://gitlab.com/kicad/code/kicad/issues/12887
2022-12-24 22:20:03 +00:00
Jeff Young 833e76a0bc KiCad standard is left-aligned checkboxes. 2022-12-24 21:01:35 +00:00
Jeff Young ba4a7a979a Don't respond to Duplicate events while placing multiple copies of a symbol.
It doesn't really make any sense as clicking will just create another copy
as well.

Fixes https://gitlab.com/kicad/code/kicad/issues/13253
2022-12-24 19:40:39 +00:00
Jeff Young bf1c4e7bcd Allow translation of simulation error messages. 2022-12-24 11:30:56 +00:00
Jeff Young f00ec339fd Don't set IS_NEW flags during clean-up operations.
Fixes https://gitlab.com/kicad/code/kicad/issues/13252
2022-12-24 11:17:13 +00:00
Jon Evans 5657ca5a04 No-connects might not be connected to a pin
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13256
2022-12-23 20:50:49 -05:00
Jeff Young 6f44468385 Fix more lifetime issues in simulator tuning.
Fixes https://gitlab.com/kicad/code/kicad/issues/13257
2022-12-23 22:03:24 +00:00
Jeff Young 981254543a Allow line-continuations in name=value parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/13255
2022-12-23 20:05:16 +00:00
Jeff Young 00fe8f0f70 Minor tuner panel layout fixes. 2022-12-23 20:04:26 +00:00
Jeff Young 8069e5d5d6 Fix sim bug running a command the first time when no command in doc.
Fixes https://gitlab.com/kicad/code/kicad/issues/11366
2022-12-23 18:21:26 +00:00
Jeff Young bfd3b40672 Bug fixes for tuning.
1) Don't save SCH_ITEM pointers in long-lived structures.  Use KIIDs
   instead.

2) Use the correct sheet for the referenced item, not the current sheet.
2022-12-23 17:40:36 +00:00
Jeff Young 604d7a72d6 Fix bug in tuning when value is stored in Value field. 2022-12-23 17:40:36 +00:00
Jeff Young e2f2f3518b Minor improvements to tuner panel look & feel. 2022-12-23 17:40:36 +00:00
jean-pierre charras e5363d164c Lib symbol editor, export SVG: fix incorrect position of the drawings.
Fixes #13249
https://gitlab.com/kicad/code/kicad/issues/13249
2022-12-23 16:31:35 +01:00
Jeff Young 66eafc56bb Don't suggest we're going to cancel already-added signals. 2022-12-23 12:46:18 +00:00
Jeff Young 3f49fa5361 Don't write sim.params for library model unless we actually have overrides. 2022-12-23 12:46:18 +00:00
Jeff Young cd7be966c0 Fix typo when un-escaping parameter name. 2022-12-23 12:46:18 +00:00
Jeff Young 7f60b87d1d Implement fallback models for SPICE .lib models that we can't parse. 2022-12-22 22:35:09 +00:00
Jeff Young d0d6dc6ce0 Clang-tidy warnings reduction. 2022-12-22 22:35:09 +00:00
Mike Williams 9b782fa827 Schematic: don't deselect line ends when right clicking off-selection 2022-12-22 14:16:38 -05:00
Mike Williams 8b7d0d71fb Schematic: show update/change symbols for multiple symbol selection
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13231
2022-12-22 14:00:51 -05:00
Jon Evans 66799b60f8 DbLib: Reconnect if connection is lost 2022-12-22 12:15:04 -05:00
Mike Williams 3037f2b444 Schematic: don't require cursor on selected net to assign netclass
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13199
2022-12-22 10:15:48 -05:00
Jeff Young 7abfa46531 Inferred sim value improvements, and a unit test for them. 2022-12-21 17:03:49 +00:00
Jeff Young e64852c833 Clearer naming. 2022-12-21 17:03:46 +00:00
Jeff Young e7e3f3bced SIM_MODEL code simplification.
1) Reduce API surface.
2) Prefer for(int) loops when what we're looking for is the index of
   the item to be found
3) Move "_" escape processing to SIM_MODEL_NGSPICE (which is the only
   model which uses the escape mechanism)
2022-12-21 17:01:58 +00:00
jean-pierre charras 8e4911bba2 Simulation: make a few errors thrown from PEGTL a bit more understandable. 2022-12-20 18:54:14 +01:00
Mike Williams 093c0c2c98 Schematic: add simulation button to toolbar
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2331
2022-12-20 08:56:36 -05:00
Mike Williams fc054bda8e Schematic: fix edit symbol assert
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13197
2022-12-20 08:23:02 -05:00
Jeff Young 97010b598d Update all units when a schematic symbol is edited in the Symbol Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/13208
2022-12-19 23:09:13 +00:00
Mike Williams 389f0655cd Schematic: re-enable old break wire functionality, add slice
Also fix break/slice wires for multiple wires. The shortcut and code
always allowed it, the context menu just didn't appear.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13163
2022-12-19 15:55:59 -05:00
Jeff Young 8db015bc0f Accept thousands separators in inferred values. 2022-12-19 20:05:54 +00:00
Jeff Young 58ce0bb804 Simulation bug fixes.
1) Use C-locale when converting output of parsers to strings.

2) InferSimModel() must run on local copy of fields, not the fields in
the symbol (which might be different if they've already been edited in
the Symbol Properties Dialog, for instance).

3) InferSimModel() should accept a deviceType already set to RLC.

4) Don't output trailing decimal separators if there's no fraction.
2022-12-19 18:14:13 +00:00
Jeff Young cbb70f0da1 Formatting and CLang-Tidy warning reduction. 2022-12-19 13:51:49 +00:00
Jeff Young 113fd83fdd Fix Clang-tidy warnings. 2022-12-19 13:19:21 +00:00
Jeff Young ebcc1ac062 Use current cursorPos when creating sheet pins.
Fixes https://gitlab.com/kicad/code/kicad/issues/13206
2022-12-19 12:27:55 +00:00
Jeff Young a3a2e2e5b1 Update demos and legacy qa files SpiceMapping -> Spice_Node_Sequence.
Also removes migration in the code as it will no longer be needed.
2022-12-19 12:04:53 +00:00
Jeff Young 04f50ce687 Generate default pinMap from symbol's pins when we don't know SIM_MODEL's pins. 2022-12-19 11:40:52 +00:00
Jeff Young df8eb59854 Don't use SPICE_MODEL_SUBCKT::CreatePins to crate a default pinMap.
(It creates a fully-unconnected map on the premise that it's easier
to add a pinMap than to edit one.  This is probably no longer true
now that you don't have to un-assign a pin before re-assigning it.)
2022-12-19 11:40:52 +00:00
Jeff Young 1ce6cd6d4d Naming clarity. 2022-12-19 01:51:24 +00:00
Jeff Young 7433322778 Handle a couple more legacy formats found in legacy_sallen_key demo. 2022-12-19 01:47:23 +00:00
Jeff Young b06c245b8f Don't double-add DC parameters.
(Remember that DC's inlineTypeString used to be "".)
2022-12-19 01:19:55 +00:00
Jeff Young 7192c565b8 Add simple VI model inference. 2022-12-18 22:54:12 +00:00
jean-pierre charras a9acb2e215 Fix incorrect format in a wxString::Format() 2022-12-18 20:30:15 +01:00
Ian McInerney 618347ef50 Regenerate ibis dialog to remove unused sizer from header
It appears the dialog had already been updated to remove it from the
formbuilder project and the cpp file, but the header wasn't checked in
at the same time.
2022-12-17 23:37:24 +00:00
Ian McInerney 2f8cc194c1 Initialize variables inside file dialog customizer classes 2022-12-17 23:37:24 +00:00
Ian McInerney 0bd39516c4 Cleanup eeschema save as extra control creation to match pcbnew 2022-12-17 23:37:24 +00:00
Jeff Young 8324c0b0cc Fix event order bugs in Sim Model Editor dialog.
onParamGridChanged was firing before CommitPendingChanges which meant
the edited value didn't get saved if the editor was still open when
OK was clicked.
2022-12-17 22:33:00 +00:00
Jeff Young 321de57d7c Bug fixes for simulator.
1) Finish removing pin-count based APIs.  We need to know the pin names
as well, not just the count.

2) Fix a bug in the regexp for SPICE functions to allow both lowercase
and uppercase function names

3) Move CreatePins() overrides to the new API so that we get pins on
raw SPICE models.

Fixes https://gitlab.com/kicad/code/kicad/issues/13190
2022-12-17 20:29:24 +00:00
Jeff Young 6b70c679cf Migrate more V6 SPICE syntax to V7.
Also fixes various bugs if symbols contained non-indexed pin numbers.
We really need to know the actual pin names when creating models, rather
than just assuming 1, 2... etc.

Fixes https://gitlab.com/kicad/code/kicad/issues/13183
2022-12-17 15:23:51 +00:00
Jeff Young 09302296f4 Use SCH_SHEET_PATH interface to get page numbers.
Fixes https://gitlab.com/kicad/code/kicad/issues/13021
2022-12-16 22:49:42 +00:00
Jon Evans 5abf73e3c9 Never call ReCreateMenuBar inside a menu event handler
As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
2022-12-16 16:37:51 -05:00
Jeff Young 65552df6ce Quite Coverity. 2022-12-16 19:11:34 +00:00
Jeff Young dba3c589d0 More bug fixes for escaped model parameters.
Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....

Fixes https://gitlab.com/kicad/code/kicad/issues/13179
2022-12-16 16:34:41 +00:00
Jeff Young 08a8a20794 Sort pins in numeric order before attempting to match to SPICE model.
Fixes https://gitlab.com/kicad/code/kicad/issues/13164
2022-12-16 14:18:44 +00:00
Jeff Young 24786fe0e9 Fix multi-unit symbol bugs.
1) SPICE pins need to include all units
2) Already-seen-unit-x needs to be reset when getting netlist again.

Fixes https://gitlab.com/kicad/code/kicad/issues/13164
2022-12-16 13:57:46 +00:00
jean-pierre charras 89153ca75a Eeschema: fix incorrect calculation of unit id in reference: U1.A was shown as U1A.
Fixes #13178
https://gitlab.com/kicad/code/kicad/issues/13178
2022-12-16 11:48:26 +01:00
Seth Hillbrand 6d5a9153ab Move resolve function to general usage
Libraries are created multiple times, so we need to resolve the library
locations each time

Fixes https://gitlab.com/kicad/code/kicad/issues/13083
2022-12-15 15:34:48 -08:00
Seth Hillbrand e91c039ed3 Prevent event stackup when init pages
The paged book initialization (and others) can generate events,
re-laying out the whole dialog multiple times during initialization.
This halts events during the layout period

Fixes https://gitlab.com/kicad/code/kicad/issues/13158
2022-12-15 11:39:03 -08:00
Jeff Young a41f27a022 Silence Coverity. 2022-12-15 18:14:19 +00:00
Seth Hillbrand bb7682f913 Resolve using env/project if lib isn't found
Relative include commands resolve in the following order:

1. local to the file from which they are included
2. local to the project
3. local to the SPICE_LIB_DIR directory

Fixes https://gitlab.com/kicad/code/kicad/issues/13083
2022-12-15 09:41:25 -08:00