Commit Graph

9253 Commits

Author SHA1 Message Date
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