Commit Graph

224 Commits

Author SHA1 Message Date
Alex Shvartzkop 16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Alex Shvartzkop 2babd574be Refactor autosave prefix into FILEEXT. 2024-04-22 04:06:04 +03:00
Marek Roszko 4a3018615b Be explicit with lazy_ctor captures 2024-04-12 19:56:02 -04:00
Jon Evans 9c113b25a4 Allow turning the API server on/off at runtime 2024-04-03 22:04:11 -04:00
Jon Evans 6bd02cae6d Refactor; add user control over API server 2024-04-02 19:51:18 -04:00
Jon Evans f613cd1cb4 ADDED: A new IPC API based on protobuf and nng
Details, documentation, and language bindings are works in
progress and will be evolving over the course of KiCad 9
development.
2024-04-02 19:34:36 -04:00
Jeff Young 1152b0462c Grid properties for GerbView.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17372
2024-03-10 18:21:50 +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
Marek Roszko 585cf841e5 Create a singular point for events like EDA_EVT_UNITS_CHANGED to be exported out of kicommon 2024-03-02 16:29:08 -05:00
Jeff Young 9ff66d0e71 Don't capture references to local variables for CallAfter.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16934

(cherry picked from commit 9d40374baf)
2024-02-23 16:53:30 +01:00
Mike Williams 6125a183b4 Settings: make sure file history size is at least 1 2024-02-07 09:00:13 -05:00
Jon Evans bfbf000f60 Add some safety around event-driven menubar recreation
Maybe addresses sentry KICAD-PC
2024-01-24 23:30:34 -05:00
Jeff Young 7975ad495b Push busyCursor out of scope after building dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16653
2024-01-19 17:13:15 +00:00
Marek Roszko 4e0e348688 FromDIP the default frame sizes 2024-01-17 23:01:58 -05:00
Marek Roszko f6401b0903 Fix preferences dialog on hidpi using FromDIP 2024-01-16 15:33:32 -05:00
Seth Hillbrand a044ca8d4d Don't show preferences without lib table init
Since we require lib tables for the kiface, we require them for
instantiating the kiface and won't show preferences without them

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16611
2024-01-16 09:18:22 -08:00
jean-pierre charras ec3bf79c42 Fix incorrect Help menu on Windows
Fixes #16598
https://gitlab.com/kicad/code/kicad/-/issues/16598
2024-01-15 08:37:12 +01: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
Marek Roszko c8f646efb1 ADDED: KiCad update check
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15026
2023-12-13 20:47:40 -05:00
Jeff Young f83d60a48f Clean up autosave files when reverting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15998
2023-11-05 12:20:31 +00:00
Jeff Young fc4bc10d27 Separate out axes definitions between ModEdit and PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5711
2023-10-25 15:01:36 +01:00
Seth Hillbrand d99641be40 ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates

Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2023-10-20 12:51:47 +00:00
Marek Roszko bee6e6be01 AddMenuLanguageList should live in EDA_BASE_FRAME, its only user 2023-10-16 19:49:52 -04: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
Ian McInerney fb3bfc3c57 Move About dialog to an action 2023-10-04 22:17:47 +01:00
Jeff Young fe0fb92441 Reduce visual clutter in GAL display options. 2023-09-04 13:06:46 +01:00
Mike Williams b5cfd91268 Preferences: reset tools after grid changes
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15522
2023-08-28 08:15:27 -04:00
Jeff Young 4fefd95e0c Move grid definitions to Prefs and grid origin to a separate dlg.
Grid origin is document-wide, while grid definitions are app-wide.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2262
2023-08-26 13:32:24 +01: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
Jeff Young 0c37e3c443 Remove realistic-mode (and duplicated settings from preferences).
Most of these settings are now available in the appearances panel.
It was concluded in a Zulip discussion that any missing items can
be added back in time if people find they need them (ie: complain).

Also hooks up 3DViewer to the common language framework.
2023-08-23 14:07:58 +01:00
Ian McInerney 54759389de Re-add event handler for the menu events generated on macOS
macOS' application menu generates command events and can't call our tool
framework directly, so we have to keep the event table handlers around
to handle these events.
2023-08-08 11:50:24 +01:00
Ian McInerney a3a701a95e Move preferences to an action instead of a wx event 2023-08-08 00:51:22 +01:00
Josue Huaroto 4cad021ef4 Add Open preferences folder button in Preferences Dialog 2023-07-13 14:10:31 +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
Jeff Young 1b7473c353 Make sure Help menu is at end of menubar. 2023-06-26 14:11:13 +01:00
Ian McInerney 480223f67c More RunAction specialization 2023-06-20 21:52:50 +01:00
Alex Shvartzkop f5da58e17d PAGED_DIALOG: allow setting initial size in ctor. 2023-06-16 18:53:00 +03:00
Jeff Young b7f0aae006 Nullptr safety for UI Conditions.
We don't really control when these are called, so best not to assume
we've finished initialization of the frame/screen/document/whatever.

Possible fix for KICAD-KY.
2023-06-12 12:38:50 +01:00
Jeff Young d5b5a3eaf4 Add action info to Undo/Redo menus.
Note that this only works where a BOARD_COMMIT or SCHEMATIC_COMMIT is used.
(BOARD_COMMIT is used almost universally in PCBNew, but SCHEMATIC_COMMIT
has very little adoption in EEschema so far.)
2023-06-07 14:37:34 +01:00
Jeff Young c36b0fcda7 Make sure 3D file browser is treated as modal by quit.
(Otherwise we crash when freeing it during the quit.)
2023-05-30 14:58:46 +01:00
Seth Hillbrand 48ecd742eb Maintain file permissions when renaming
Temporary and autosave files do not neccessarily have the correct
permissions set to replace existing project files.  This updates the
permissions to match the existing values where possible

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13574
2023-05-24 17:09:38 -07:00
Jeff Young cbf83c4161 Pin preferences dialog size.
While unfortunate (we generally frown on having fixed sizes in
favour of having everything auto-layout), in this case it's a
cost of lazy-loading the panels.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14785
2023-05-21 11:17:36 +01:00
Jeff Young 9ae8255202 Insta-prefs. 2023-05-10 18:14:14 +01:00
Jeff Young 86ca90aa2d Fixes to allow copy/paste of pin data.
1) allow paste even if initial cell isn't writeable
2) allow paste to add rows if there's an addHandler defined

Fixes https://gitlab.com/kicad/code/kicad/issues/14508
2023-04-16 23:04:47 +01:00
Jeff Young b3e2cf218f Fix Mac crash-on-quit when timed infobar is up. 2023-04-03 23:44:40 +01:00
Marek Roszko 8a8589b9db Fix cli crash due to dialogs buried in the pcb parser...
Fixes sentry KICAD-Q2
2023-03-24 19:52:48 -04:00
Wayne Stambaugh 66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04:00
Marek Roszko 0ff32d20cd wxS more things 2023-01-22 09:41:42 -05:00
Seth Hillbrand 7e5a2450b8 Move multiple wxMessageBox to DisplayErrorMessage
Also provide protection for headless running in multiple callsites

Fixes https://gitlab.com/kicad/code/kicad/issues/13575
2023-01-18 16:54:01 -08:00
Jeff Young 4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +00:00