87 Commits

Author SHA1 Message Date
JamesJCode
ee9e94df04 Don't assume SCH_SYMBOLs have a LIB_SYMBOL when resolving embedded files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21497
2025-08-18 20:30:33 +01:00
dsa-t
1af8722b0f Disable ibeam cursor setter for search fields on non-OSX.
The ibeam cursor gets stuck on MSW when mouse leaves the field.


(cherry picked from commit 47381f3d90f08ca832dd1152d02fdaa01dc3a52a)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-08-18 15:56:06 +03:00
Jeff Young
b53b1cfd01 Debugging. 2025-07-14 13:17:53 +01:00
Jeff Young
ad83ad512a Debugging. 2025-07-12 16:24:55 +01:00
Alex Shvartzkop
4a5039c2cf Remove some unused variables. 2025-07-02 16:48:26 +03:00
aris-kimi
9c5b2c55fb Move simulation frame panel togglers to sch_actions and eechema.Simulator domain 2025-06-09 10:10:43 +01:00
Jeff Young
0ddb34e8b0 Nullptr safety. 2025-06-03 11:41:27 +01:00
Jeff Young
327cca9de5 Coverity fixes. 2025-05-25 20:01:18 +01:00
Jeff Young
42c68f1a16 Uniform application of recursion guards in simulation code. 2025-05-25 09:09:11 +01:00
Jeff Young
f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
Jeff Young
524575a595 Allow embedded files to come from components
as well as parent containers, part II.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20210
2025-04-25 12:26:31 +01:00
jean-pierre charras
7bd4fa3fa6 Fix a Coverity and a compil minor warning 2025-03-26 13:19:00 +01:00
Jeff Young
7401b57fcb Warning messages for simulation tuning.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20274
2025-03-11 11:02:20 +00:00
aris-kimi
e80780d3ad Added more simulation cursors at will.
Added m_signalsGrid context menu entries, Create a new cursor from every cell but Delete only from Cursor 3 and above

New entries are saved into their *.wbk files. Loading of current files should not be affected, as tested,
and on save they get the new property added.

Updates *.wbk file version to "7".

If the tab has more cursors than the loaded file, extra cursors should not be affected, otherwise new cursors shown up.
CursorD left hopefully untouched and kept the legacy behavior close to Cursors 1 & 2.

No more known bugs. It is now working as expected as tested on win11 and Debian 12.

m_cursorsGrid events also work.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15211
2025-02-27 22:42:11 +00:00
Seth Hillbrand
157c7422b0 Allow sim models to reference embedded files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20024
2025-02-22 14:53:59 -08:00
lucas
2559ac50a3 Simulator: Bug fix quoting netnames for user defined signals
- Fixes issue: #18598
- Netnames that contained other netnames weren't quoted correctly
- E.g. /out1 and /out were in conflict in previous method
- Fixed formatting afted review
2025-02-19 18:15:57 +00:00
lucas
e6eff2ce27 Simulator: Fix live view (regression)
- Fixes regression from commit 1fc3068d
- Traces were not updated while simulation was running
2025-01-18 15:11:02 +00:00
Seth Hillbrand
1fc3068de6 Don't ask for data before running
If the sim hasn't run, we don't have data and ngspice will complain.
It's a harmless message but new users don't know this and it sounds
problematic.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19600
2025-01-12 16:14:40 -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
7211728365 nullptr protection 2024-12-25 15:14:54 +00:00
JamesJCode
2cfa33a50a Handle simulator plot cell attributes correctly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17841
2024-12-24 11:23:05 +00:00
Jeff Young
435ed59c82 Make sure to turn cursors off on hidden signals.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19310
2024-12-23 18:04:09 +00:00
Alex Shvartzkop
36019314e9 Make simulation reporter warnings non-fatal.
Adds REPORTER::HasMessageOfSeverity for WX_STRING_REPORTER,
which allows us to show simulation warnings and fail only if there's errors.

Also fixes a crash when SPICE_GENERATOR_KIBIS throws an IO_ERROR.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18143
2024-09-05 05:59:35 +03:00
Jeff Young
e3d4137521 Fix some contrast and update issues with sim cursors.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18390
2024-08-15 12:29:59 -06:00
Jeff Young
9fcbd4e6d0 Slight reduction in asserts. 2024-07-18 18:01:05 +01:00
Mathieu Pilato
c8aa3f21aa Fix measurement format not saved when modified
Always update stored measurements name / format when updating measurement
2024-07-09 16:39:36 +00:00
Mathieu Pilato
75141da53a Move default format inside SPICE_VALUE_FORMAT
This ensures that the default format is the same, however the measurements are added
2024-07-09 16:39:36 +00:00
Mathieu Pilato
98b4a58059 Clear measurement grid while changing tab
Prevent a tab change while editing measurement from impacting measurements of target tab
2024-07-09 16:39:36 +00:00
Mathieu Pilato
c6e8838178 Fix measurements not being loaded with workbook
onPlotChanging() was overwriting loaded measurements. Do not read grid from onPlotChanging().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18326
2024-07-09 16:39:36 +00:00
Mathieu Pilato
414ac2b83c Increase default measurement precision to 3 digits 2024-07-09 16:39:36 +00:00
jean-pierre charras
e2e95ec461 SIMULATOR_FRAME_UI: catch all nlohmann::json::xxx errors.
Previously, only nlohmann::json::type_error was captured, and other errors
were not handled, creating unhandled exception issue when reading broken
*.wks files.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18309
2024-06-30 18:39:59 +02:00
Jeff Young
c633ac26eb Don't lose value of cursor checkboxes when running sim.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
2024-06-14 16:37:49 +01:00
Jeff Young
300313ce73 Correctly write phase/gain signals to workbook.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
2024-06-14 16:37:49 +01:00
Jeff Young
7b63429fe1 Current gain is the first Y axis, not the second.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
2024-06-14 16:37:49 +01:00
Jeff Young
2e38fa84bf Don't allow writing "//" to spice netlist.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18161
2024-06-10 15:36:20 +01:00
Jeff Young
edae328ca6 Push multi-sweep traces down into MathPlot.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17215
2024-05-23 12:24:56 +01:00
Jeff Young
856d03dbe2 Create signals from .save directives (as well as .probe directives).
(Also fixes a bug where we only looked for a single
token after .probe.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18057
2024-05-22 22:37:57 +01:00
Jeff Young
e73d2a32dc ADDED checkbox for saving SPICE digital event data.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17828
2024-05-12 18:24:53 +01:00
Alex Shvartzkop
5475359d00 More build time optimizations. 2024-05-06 04:39:28 +03:00
Marek Roszko
161cfbacd4 constexpr the let user{} format string 2024-04-12 22:48:34 -04:00
Jeff Young
7341d4bf37 Update m_LastLegendPosition after setting dirty bit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17411
2024-03-13 10:39:03 +00:00
Jeff Young
ed61c5593f Don't show normal cut/copy/paste items in Signals grid.
(Do allow a copy of signal names though.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17395
2024-03-11 18:14:38 +00:00
ecorm
4dcd1fb8e2 Fix formatting from simulator X/Y zoom changes 2024-03-10 12:43:18 +00:00
ecorm
16de0a666c Horizontal/vertical zoom for Simulator plots
ADDED: Horizontal/vertical zoom for simulator plots, via mouse wheel,
toolbar buttons, menu commands, and hotkeys.

ADDED: Simulator preferences panel, populated with mouse wheel
and trackpad settings that control pan and zoom of simulator plots.

ADDED: Zoom In/Out Horizontally/Vertically commands that can be bound
to hotkeys.

CHANGED: Simulator plot scroll wheel gestures are no longer hard-coded
and can now be configured via the new Simulator preferences panel.

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

Other unreported bugs that were fixed:

- Fixed wierd, jumpy simulator plot view limiting behavior.

- Fixed Zoom In Center and Zoom Out Center commands not preserving
  the simulator plot center point.

- Fixed simulator plot nudging when exported as PNGs.

- Fixed rectangular selection zoom being able to exceed simulator plot
  view limits.

Notes:

- Provided new SIM_PREFERENCES struct to be used for future
  simulator preferences set via the simulator preferences dialog.

- Bundled pre-existing EESCHEMA_SETTINGS::SIMULATOR settings into
  EESCHEMA_SETTINGS::SIMULATOR::VIEW.

- Replaced mpWindow::EnableMouseWheelPan with more general
  SetMouseWheelActions.

- Refactored and tidied up wxMathPlot's mpWindow code involved with
  fitting, zooming, and panning.

- Consolidated long lists of duplicated member variable initializers to
  a new mpWindow private delegated constructor.

- Provided provisional Zoom In/Out Horizontally/Vertically toolbar
  icons that need improvement by a graphics designer.

- Provided gitignore entries for the Qt Creator IDE
2024-03-10 12:43:18 +00:00
Jeff Young
ff8ddae9bd Convert OP text variables pin names/numbers to SPICE vectors.
Also fixes a wrap-around bug in SPICE_VALUE::Normalize() where
it would lose the run of itself if the value was already
normalized to either the largest or smallest UNIT_PREFIX.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17228
2024-03-04 14:25:29 +00:00
Jeff Young
20ea299742 Cleanup. 2024-02-28 22:18:26 +00:00
Andrej Krpic
006f93773c Fix collecting of signals for S-Parameters analysis 2024-02-23 18:34:21 +00:00
Jon Evans
ca6b40ef1c Make sure to create power axis when restoring state
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16912
2024-02-08 17:48:12 -05:00
Jeff Young
a2b204572d Don't assert when a sim returns no results.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16749
2024-01-25 15:40:12 +00:00
Jeff Young
e438fc2569 Remove dead code. (Coverity)
Also fixes a (small) memory leak.
2024-01-04 15:57:30 +00:00