51 Commits

Author SHA1 Message Date
Ian McInerney
85810510f4 Tweak toolbar settings a bit
* Manage the settings using the settings manager for better lifetimes
* Better architect the internals and JSON to make it easier to identify
  the various tool types
2025-02-28 01:57:37 +00:00
Ian McInerney
548334b4e2 Load toolbar configuration from settings 2025-02-28 01:57:37 +00:00
Ian McInerney
7ad1103f55 Move toolbars to a serializable storage format 2025-02-28 01:57:37 +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
Jeff Young
8874f137fa Read hotkeys from disk after they change.
(Otherwise we'll write the old versions back out
when closing one app.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19612
2025-02-01 20:01:13 +00: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
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
Mathieu Pilato
a5b7c65d7a Fix spice errors when rerunning a simulation with measurements
Mark the simulation as not finished before starting it, preventing measurements from being requested
from spice right before simulation starts
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
441da8dfb6 Don't overload error dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18195
2024-06-24 22:50:14 +01:00
Jeff Young
0f8d543172 Consistent capitalization. 2024-06-14 22:02:08 +01:00
Jeff Young
a02cb75656 Cleanup. 2024-06-10 20:23:36 +01:00
Alex Shvartzkop
6dd5c7d733 Make IBIS errors visible / more obvious.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18041

(cherry picked from commit 6dfd4177672a440212376ec69bbbb75b7a64cc24)
2024-05-19 01:44:56 +03:00
Jeff Young
55b2c4dbf4 Update signals & measurements when netlist might have changed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17616
2024-05-10 12:02:56 +01:00
Alex Shvartzkop
81281f7e74 Send project path to ngspice for code model input files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16527

(cherry picked from commit eb7e781becf074556442b226833375ada07dbf19)
2024-05-08 23:41:05 +03:00
Marek Roszko
c042b51be9 Fix another deprecated lambda capture 2024-04-12 22:49:50 -04:00
jean-pierre charras
f3966371be Simulation: add export current plot to clipboard and current schematic
These exports are in file menu.
2024-03-19 17:05:55 +01: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
12c8f5b14d Update compatibility mode and save flags in ngspice.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16955
2024-02-13 14:50:15 +00:00
Jeff Young
1c746f0134 Correctly parse fft commands with linearize in them.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16011
2023-11-04 15:45:08 +00:00
Jeff Young
aab0696bb6 Zoom undo/redo for simulator.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14580
2023-09-26 13:19:41 +01:00
Jeff Young
a6bceb8182 Don't set modified when loading workbook.
Also keep a shadow variable of the legend position so we can notice
when the mpWindow's OnMouseMove() handler changes it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15363
2023-08-09 12:09:29 +01:00
jean-pierre charras
e9f6ff4366 Simulator frame: removes * indicator for unsaved workbook after saving it.
Fixes #15236
https://gitlab.com/kicad/code/kicad/-/issues/15236
2023-07-24 08:55:34 +02:00
Jeff Young
9c08d4febe ADDED support for simulation plot margins and GUI for Y axis locking. 2023-07-19 23:40:10 +01:00
Jeff Young
ff044cd0cf Mostly a terminology update...
... but also makes DIALOG_SIM_COMMAND and SIMULATOR_REPORTER a bit
more simulator-agnostic.
2023-07-14 17:46:06 +01:00
jean-pierre charras
6a47fe1e3c simulator: shows the wxCURSOR_ARROWWAIT cursor only when the sim is running.
Reset the mouse cursor to its default shape when the simulation is finished.
2023-07-10 13:30:14 +02:00
Jeff Young
8f9a67063a Straighten out some really confusing terminology in simulator GUI. 2023-07-09 23:07:54 +01:00
jean-pierre charras
9ee21e4eeb simulator: do not show a message saying a command directive has changed
when there is no old command directive.
2023-07-08 20:30:57 +02:00
Jeff Young
bde9c2cbc5 ADDED FFT analyses.
CHANGED abandon the unpredictable behaviour of the Simulation Command
dialog.  You now separately add simulation tabs (which have invariant
command types once created), and the dialog edits the current tab.

Also a bunch of bug fixes to make multiple simulation plots actually
work.
2023-07-07 12:33:50 +01:00
Jeff Young
d563d66b86 ADDED Fourier analyses of .tran data. 2023-07-04 16:54:38 +01:00
Jeff Young
492ef62053 ADDED support to save contributions from all noise generators.
You must first check the checkbox in the Simulation Command dialog,
after which the signals will appear in the User Defined Signals
autocomplete lists.
2023-07-04 11:05:10 +01: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
Jeff Young
9199d7a781 Update simulation results as the sim runs.
Also adds a time axis which grows by 2X at a time rather than to the
size of the current data.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11255
2023-06-18 16:52:11 +01:00
Jeff Young
150e2b8a19 Separate BITMAP2CMP_PANEL from BITMAP2CMP_FRAME.
This is primarily to allow wxFormBuilder to create the panel without
the dangerous hack of passing a wxWindow ID into KIWAY_PLAYER's ctor.
2023-06-15 17:39:10 +01:00
Jeff Young
abc0c19d64 Separate SIMULATOR_PANEL from SIMULATOR_FRAME.
This is primarily to allow wxFormBuilder to create the panel without
the dangerous hack of passing a wxWindow ID into KIWAY_PLAYER's ctor.
2023-06-15 17:39:10 +01:00
Jeff Young
5c4ca9f092 Renaming to support potential future usage of SIMULATOR_PANEL as a panel within SIMULATOR_FRAME. 2023-06-15 17:39:10 +01:00
Jeff Young
46564055f4 More protection around an exceedingly dangerous hack.
The API is needed for wxFormBuilder, and I couldn't figure out any
way around it, but we can at least reduce the risk of someone calling
it accidentally (again).
2023-06-14 12:52:49 +01:00
Jeff Young
e698156975 Upgrade many editing actions to SCHEMATIC_COMMIT. 2023-06-09 22:41:47 +01:00
Wayne Stambaugh
bdee545841 Coverity warning fixes. 2023-06-03 07:28:17 -04:00
jean-pierre charras
2aa9ea87eb Simulator: when using Incremental Connectivity, ensure the netlist is up to date 2023-05-03 18:59:18 +02:00
Jeff Young
60b019591d Simulator fixes.
1) Don't read libraries multiple times
2) VDMOS default is nchan if not specified
3) In the absence of a workbook default to LTSpice compatability
4) Don't attempt to write out a model line for a subckt; it never has
a baseModel
2023-04-24 13:52:52 +01:00
Jeff Young
51b6ec0dce Don't exit KiCad when simulator window is closed. 2023-04-18 23:55:56 +01:00
Jeff Young
02c5a31b99 Fix close button on simulator frame.
Fixes https://gitlab.com/kicad/code/kicad/issues/14551
2023-04-16 23:45:18 +01:00
Jeff Young
d01c023d5a Retire the lib-tree scoring algorithm.
It appears to cause more confusion than help.

Fixes https://gitlab.com/kicad/code/kicad/issues/13905
2023-04-14 23:35:27 +01:00
Jeff Young
a14c017def Save location of legend in worksheet.
Also provides a different cursor when over a legend (to make it clearer
that you can drag it).
2023-03-20 09:51:41 +00:00
Jeff Young
5041bddc3b Union workbook sim commands with any defined on schematic.
Fixes https://gitlab.com/kicad/code/kicad/issues/14215
2023-03-10 21:33:06 +00:00
Jeff Young
630ff02369 Fix bone-headed logic.
(Else clause never gets called because 3 is always > 2.)
2023-03-06 10:26:59 +00:00
Alex
d2bd7e33b9 Remove extra canvas redraws when changing sheets. 2023-03-05 04:33:07 +03:00
Jon Evans
610e787ada Move to requiring explicit action to save project settings 2023-03-04 14:25:07 -05:00
Wayne Stambaugh
4e99812145 Coverity fixes and code cleaning. 2023-03-04 13:02:05 -05:00