Commit Graph

6289 Commits

Author SHA1 Message Date
Alex Shvartzkop e128896ba6 Schematic plugins refactoring, fixes for PCB plugins.
- Move PLUGIN_FILE_DESC to common.
- SCH_PLUGIN: rename Load -> LoadSchematicFile, Save -> SaveSchematicFile.
- Use PLUGIN_FILE_DESC and CanRead* in schematic plugins.
- Return none/unknown types from Find/GuessPluginType functions.
- Iterate over file types for file wildcards.
- Clean-up header checking in IO plugins.
- Use PCB plugin list in IO_MGR::GuessPluginTypeFromLibPath.
2023-08-31 05:08:03 +03:00
Mike Williams b8a61719c3 Grids: make overrides use existing grids (choice box) 2023-08-30 13:33:04 -04:00
Mike Williams b1a388ca69 Grids: Support X and Y for all grids, add optional names 2023-08-30 11:22:19 -04:00
Josue 94e86a69be Update RECT to RECTANGLE 2023-08-29 11:50:22 -05:00
Josue 6429051750 change Rectangle property: Length to Height 2023-08-29 11:50:05 -05:00
Josue c3766bb250 Implement Length and Width for RECT 2023-08-29 11:50:02 -05:00
Josue 5061ca54e7 add length and angle properties to segment 2023-08-29 11:49:55 -05:00
Roberto Fernandez Bautista 32b6deb8b1 ADDED Migrate libraries button in Footprint Library Table
Allows easy migration of legacy and non-KiCad footprint libraries
2023-08-28 22:44:10 +02:00
Roberto Fernandez Bautista 7037076360 Symbol Library Table: Show CADSTAR Parts Libraries in file selector
Even if same extension, it is good to display it as a way of showing what
we support
2023-08-27 20:52:45 +02:00
Marek Roszko 208d146a03 Force fontconfig to look at the correct path for fonts.conf on windows 2023-08-26 13:53:43 -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
Marek Roszko cbc60d90ec Add missing line style prop to eda_shape 2023-08-24 22:32:12 -04:00
Mike Williams 2764e59400 Grids: add buttons to re-order grids 2023-08-24 13:58:22 -04:00
Jeff Young 0f81dd3b5e Give Grid Settings a more standard KiCad look and feel.
Also simplifies the dialog by removing the user grid (now that you
can add as many user grids as you want).

This does mean that you can no longer have an asymmetric grid, but
it gets too complex if we allow everything for everyone.
2023-08-24 16:41:08 +01:00
Mike Williams d9c2e0ab54 PCB: start of grid overrides
Only works for moves.
2023-08-24 10:29:09 -04:00
Mike Williams 0f781f328e GRID_HELPER: push code to parent class
Prep'ing for PCB grid overrides
2023-08-24 10:29:09 -04: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
Alex Shvartzkop 10e2e4a12d Another try at fixing arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15471
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15469
2023-08-22 16:10:58 +03:00
Mike Williams f770500bb4 Grids: make user editable 2023-08-21 15:48:25 -04:00
Marek Roszko ea3101587a Add gltf export to step dialog 2023-08-19 19:01:29 -04:00
Alex Shvartzkop 865fa10fb2 Fix pad arcs in Gerber plot when aperture macros are disabled.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15452
2023-08-19 22:49:37 +03:00
Jeff Young ec980e8696 Move "parent" property from PAD to BOARD_ITEM. 2023-08-18 22:20:09 +01:00
Rastersoft 5936960c1e Allow to reverse the mouse wheel movement
This MR adds a CheckBox in the preferences window to reverse the
horizontal pan direction
2023-08-17 19:17:50 +00:00
Rastersoft 43fe1eec84 Unify mouse movements 2023-08-17 18:20:22 +00:00
Jeff Young 8c33c6c099 Remove unused variable. 2023-08-15 14:08:19 +01:00
Alex Shvartzkop 76e0d5981d Import system refactor for PCB plugins. 2023-08-15 05:26:12 +03:00
Jeff Young f45760062b ADDED: appearances manager for 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12413
2023-08-14 18:08:36 +01:00
Marek Roszko 5d001d4858 ADDED: ERC over cli....mostly 2023-08-13 20:31:19 -04:00
Marek Roszko 87d36dbfd8 Fix up erc json a little 2023-08-13 19:19:20 -04:00
Marek Roszko 061d18cbb0 Support json reports as option in erc/drc dialogs 2023-08-13 19:19:19 -04:00
Marek Roszko 14a0fa435c ADDED: DRC JSON report 2023-08-13 14:59:10 -04:00
Marek Roszko 34a13cb0c5 Add more thread safety to background jobs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15395
2023-08-11 22:37:43 -04:00
jean-pierre charras 7fe80abdff PCB_GRID_HELPER::BestSnapAnchor() fix overflow due to use of int.
GRID_HELPER::GetVisibleGrid() needs double, does not work with int (overflow).
Fixes #15389
https://gitlab.com/kicad/code/kicad/-/issues/15389
2023-08-11 17:59:24 +02:00
Marek Roszko 812143ac69 ADDED: Run PCB DRC via cli 2023-08-10 20:20:40 -04:00
Alex Shvartzkop 712d61d2c1 KICAD_CURL_EASY: add SetPostFields(). 2023-08-10 00:29:19 +03:00
Mike Williams 6b2a5f643a Undo/Redo: remove unused NOP type 2023-08-09 14:32:06 -04:00
Mike Williams 2a80b1c32b Undo/Redo: remove unused EXCHANGE_T type 2023-08-09 14:32:06 -04:00
Jeff Young da86593625 ADDED: Implement sorting for search panes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12614
2023-08-09 18:31:33 +01:00
Mike Williams bdecdce1b4 Exclude from Sim: move from field to attribute 2023-08-08 12:36:36 -04: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
Roberto Fernandez Bautista 3bf9797620 PNS: add new "EnableRouterDump" kicad_advanced setting 2023-08-07 23:43:54 +02:00
Jeff Young c30bdf9ba8 Implement second-level cache for escaped netnames.
While it's a bit of an encapsulation leak (see comment in
CONNECTION_SUBGRAPH::driverName()), it more than doubles undo/redo
performance in documents with *lots* of nets.
2023-08-07 21:44:04 +01:00
Jeff Young f43b90b15f Lazy context handling for SVG plotting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15325
2023-08-07 14:01:58 +01:00
Alex Shvartzkop 717ee350c8 Support >180 deg arcs in schematic. 2023-08-07 14:18:38 +03:00
Kuba Sunderland-Ober f7fe411cf5 Add stack guard page to all platforms. 2023-08-06 22:50:02 +00:00
Jeff Young 5e112ca78e ADDED: parameterize font metrics and allow customization of overbar height. 2023-08-06 20:57:41 +01:00
Marek Roszko a0ebedc0ac Add a KICAD_TEST_NOTI env var for a fake notification on launch 2023-08-06 15:51:35 -04:00
Jon Evans 5cbe3c5d42 PNS: Fix a few issues with debug logging
Hide non-copper layers for clarity

Fix saving of router settings
2023-08-06 15:30:58 -04:00
Jon Evans 4c4bbdc8f3 Stricter API for LIB_TABLE
Prevent nickname map or row parent getting out of sync

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15315
2023-08-06 00:56:51 -04:00
Jeff Young 0413270012 ADDED: Move Corner To... and Move Midpoint To...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5012
2023-08-05 16:43:55 +01:00
Marek Roszko 576be53eb1 Add missing committed file change 2023-08-04 22:12:52 -04:00
Marek Roszko 5319316815 Enhance the status bar with background progress and notifications 2023-08-04 22:06:08 -04:00
Seth Hillbrand 02335010ff Don't try to get a translated empty string
Hashing an empty string can be crashy.  And empty strings are reserved
in gettext, so we shouldn't try.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15354
2023-08-04 10:08:30 -07:00
Jeff Young c697a934b2 Update layer names to current terminology.
Also fixes some out-of-date tooltips/names.
2023-08-04 11:37:46 +01:00
Mike Williams a75fb44349 Common: add fast grid cycling
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12339
2023-08-03 11:57:51 -04:00
Jeff Young 686dfba77a ADDED autocomplete for value field in Symbol Properties dialog. 2023-08-02 20:45:52 +01:00
Jeff Young 8ac49d0bab General cleanup, coding standards, removal of dead code, etc. 2023-08-02 16:56:56 +01:00
Jeff Young f897b4bac1 Remove cover routines for std::vector.
They just make it harder to see if we're following std::vector's
contract.
2023-08-02 16:56:56 +01:00
Mike Williams 37fdcce0a0 Fields Editor Table: add checkboxes for fields representing attributes
DNP, Exclude from ..., etc.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15300
2023-08-01 14:33:30 -04:00
Seth Hillbrand f3d65b5156 Revise method of selecting footprints in contrast
When working in high contrast mode, we want to be able to select a
footprint with only elements in, e.g. silk and fab layers.

The previous design for footprint IsOnLayer had one behavior of every
other element and a different behavior for footprints.  This leads to
multiple bugs as new features use the overloaded IsOnLayer expecting it
to report if the element exists on a layer or not.

For footprints, we need a different routine to determine whether or not
to select the footprint when clicking on it.  IsOnLayer will report if
the footprint has any elements on a specific layer but we don't want to
use the bbox for a hittest because large footprints with through hole
pads will exist on every layer and have an enormous bbox.  Instead, we
filter footprints based on the hittest of each element.  This behaves in
a more logical fashion, allowing you to select a footprint by clicking
on a visible element of that footprint.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-01 10:43:13 -07:00
Mike Williams 25e391719e Fields Table: convert special strings like Quantity to named variables
Before, we did not actually prevent users from adding a field also named
Quantity to their symbols. This of course does not play nicely with the
assumptions that Quantity is a special column in the fields editor.

By making it a named variable, the user can safely add it to a symbol
and it will not be editable, and will also work in the fields table
editor as expected.
2023-08-01 10:55:32 -04:00
Mike Williams 132a0ada73 Grid Overrides: support grids-per-type that override the current grid.
Schematic only at this point while we test and refine.

PCB support is a future addition.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-07-25 10:17:57 -04:00
jean-pierre charras a16ab0aae1 Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name
issue with a Windows header on msys2.
Change very similar to the commit 9a47b344 about class PAD_SHAPE.
No actual code change
2023-07-25 09:11:55 +02:00
Seth Hillbrand 7fe83993cf Be smarter about releasing lockfiles
If KiCad crashes or exits without deleting the lockfile, don't show the
warning message unless we are not the one who locked it or there are
other KiCad instances running locally.

This should catch 99% of the cases where the message is shown
incorrectly.  There may be some corner cases where the lock file is
created on a network drive using two different machines with the same
name and same user but these cases should be (famous last words)
sufficiently rare as to not be observed in practice
2023-07-21 15:40:19 -07:00
Jeff Young 06f19aa761 Implement y axis locking for secondary y axes.
Still a bit of a work-in-progress.

Also fixes some bugs with formatting of measurements and cursor values.
2023-07-20 17:21:19 +01: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 65f66755ee Reduce overhead for unused code. 2023-07-19 23:25:05 +01:00
Jeff Young fa0338a9e6 Streamline Mac patches. 2023-07-17 22:07:36 +01:00
Jeff Young f23f75866f Remove dead code. 2023-07-17 22:06:45 +01:00
Jeff Young 64fea38e61 Seems linux impl is different.... 2023-07-17 22:05:04 +01:00
Jeff Young 19073b3e61 Fix background drawing for disabled LAYER_BOX_SELECTOR. 2023-07-17 20:30:52 +01:00
jean-pierre charras 3a4f3cb0b8 Minor Coverity and compil warnings fixes. 2023-07-17 16:19:22 +02:00
Jon Evans 4e3fd816cb Properties: rework color editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15145
2023-07-16 17:37:36 -04:00
jean-pierre charras 58a9b75883 Eechema: Do Not Place markers: add a specific setting for their color.
Previously, the color was the ERROR ERC marker color.
Now they have a specific color.
2023-07-16 20:46:30 +02:00
Jeff Young b7d53e4b18 Fix uninitialized var.
(Also follow Mac GUI guidelines, odd as they are.)
2023-07-16 19:29:38 +01:00
Jeff Young 7b81e964ab Don't copy lock files during project Save As.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15207
2023-07-16 15:40:17 +01:00
Jeff Young 63c83b3aed Remove dead code, and some formatting cleanup. 2023-07-16 14:43:29 +01:00
Jeff Young a09a5cb641 More undo cleanup.
The symbol editor has few enough items that it will still be performant
if we always send a selected-item-modifed event.  (As it turns out we
were doing that anyway as the check for child-modified flags didn't
also check for selected.)
2023-07-16 14:43:29 +01:00
jean-pierre charras 0ecf5033e2 string_utils: Add From_UTF8( const char* cstring ) and From_UTF8( const std::string aString ),
mainly because we now use std::string in a lot of function using previously char*
FROM_UTF8(const char* cstring) now calls From_UTF8(const char* cstring)
2023-07-16 08:21:43 +02:00
Jeff Young 1218f61d0a Implement undo/redo for footprint children.
Our special-cases to handle the fact that we didn't do this had far
outgrown the code necessary to actually handle it.
2023-07-15 17:37:31 +01:00
Marek Roszko 3233bbe0ba Make exported date time strings use ISO8601 format
Also rename the function to be explicit on its result format

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15185
2023-07-14 23:24:12 -04:00
Marek Roszko cbb8835c87 Add policy to alter curl revoke settings on windows 2023-07-13 19:01:04 -04:00
Mike Williams c0a5be4e9f Hotkeys: add support for alternate hotkeys
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/4422
2023-07-13 10:11:46 -04:00
Josue Huaroto 4cad021ef4 Add Open preferences folder button in Preferences Dialog 2023-07-13 14:10:31 +00:00
Jeff Young cf8294b5c2 Remove a bunch of blind (and a few redundant) static_casts. 2023-07-13 14:14:45 +01:00
Ian McInerney 5aff8b6a6e Switch to string_view in tool action construction
The TOOL_ACTION_ARGS construction method is supposed to be fairly light
weight, so instead of creating/destroying strings all the time, pass
string_views to the actual string data instead.

wx doesn't currently support string_view -> wxString implicitly
currently, so we have to do the conversion ourself.
2023-07-13 00:53:06 +01:00
Ian McInerney e926952f66 Break long header link with TOOL_ACTION and TOOLS_HOLDER 2023-07-13 00:18:20 +01:00
John Beard 09c0f713cd Add fillet and chamfer icons 2023-07-12 19:21:47 +01:00
Jeff Young 56752e9bad Move some MRU paths from app to project.
Also augments Save As path updating to handle these newly-moved paths,
and to handle absolute paths that point into the project directory.
2023-07-12 17:30:42 +01:00
Mike Williams e2f47ecabb Common: add GetTextVars for unexpanded variable names 2023-07-12 12:16:14 -04:00
Mike Williams 500779fc80 Properties: add ability to override writeable attribute 2023-07-12 12:16:14 -04:00
Jeff Young c3d10084b9 ADDED footprint associations dialog. 2023-07-11 14:52:05 +01:00
Jeff Young 8f5b7569d1 Split StyleFootprints into separate bools for fields vs text & graphics.
Also moves the settings from Board Setup to Preferences > PCB Editor.

Also collapses Track Drag Mode from radio buttons to a choice menu to
save space and allow it to be with the other editing action modes.
2023-07-10 17:15:57 +01:00
Hendrik v. Raven 7302df8be3 add missing stdlib import
wx_Treebook uses std::function which is not defined (at least) when
using wxWidgets 3.0.5.1. Fix this by adding the import
2023-07-10 11:01:59 +00:00
Jeff Young db61fe03b3 Prefer MRU path to LastImportExportPath for importing footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15102
2023-07-09 22:28:26 +01:00
Jeff Young a66360525a Broaden "Style footprint fields" to cover graphics as well.
Also cleans up the layout of the symbol & fp properties dialogs.

Also fixes the background colour of the link textEdit controls on Mac.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15152
2023-07-09 12:45:55 +01:00
Mike Williams cc7798745e Board Settings: control styling of footprint fields
Can use library values or board default settings. Defaults to board
default settings.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8161
2023-07-08 19:58:11 -04:00
Jeff Young 5bca002567 Swap non-temp and non-edit flags for SCH_ITEMs.
This is required to keep selected and brightened state across undo.

It's also probably required for things like IS_SHOWN_AS_BITMAP and
possibly ENTERED.  FWIW, most BOARD_ITEMs do a straight swap, including
the temp and edit flags.  But that seems like a risky change....

Also removes SyncView() call from Undo/Redo as that does a MODEL_RELOAD
which clears the selection.
2023-07-08 18:37:47 +01:00
Alex Shvartzkop 2689037bde PDF plotting: support bitmaps with transparency.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5979
2023-07-07 23:29:46 +05: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
jean-pierre charras 88ffcec4b5 Plotters (especially DXF) add more precision when plotting arcs (and others)
- in DXF coordinates were using 6 digits for coordinate mantissa: this is not
enough for coord in inches. Now use 16 digits
- Arc( VECTOR2I& aCentre, EDA_ANGLE& aStartAngle, EDA_ANGLE& aEndAngle, ...)
was using integers for coord. This creates significant errors for start point
and end points of the arc. Now the center is given in double, and its position
is calculated from angle end points (and radius) to do not generate a position error
for these end points (previously the error could be 20 ... 50 nm)
Fixes #15056
https://gitlab.com/kicad/code/kicad/-/issues/15056
2023-07-06 18:09:38 +02:00
Kuba Sunderland-Ober 751aef4e23 Remove unused variables. 2023-07-05 10:20:18 +00:00
Alex Shvartzkop afe176abe2 Optimize PDF plot data size for property popups; fix unicode escape.
Adds a document-level action JSInit, which defines ShM function,
allowing more compact data representation. Also reduces whitespaces.
2023-07-04 08:57:29 +03:00
Alex Shvartzkop b242779f3b Put background color behind transparent bitmaps in eeschema printing.
Most virtual printers don't support alpha blending via AlphaBlend (MSW)
properly, nor masks.
2023-07-03 02:15:05 +03:00
Alex Shvartzkop 7b5e725b98 Improve GAL panel refresh logic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15041
2023-07-03 02:15:05 +03:00
Ian McInerney 236de6679c Avoid copying tool parameter in intermediate function call 2023-07-02 22:18:24 +01:00
jean-pierre charras 821f365758 Fix missing include. 2023-06-30 20:20:08 +02:00
Jeff Young 773e1a1ab6 Actions with a COMMIT must be run synchronously.
Note that "immediate" doesn't mean quite the same thing: while it will
enter the tool immediately, it won't necessarily finish the tool during
the call if the tool has an event loop.  So for something like Rotate
"immediate" and "synchronous" have the same behaviour, but for something
like Move they do not.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15085
2023-06-30 18:57:37 +01:00
Jon Evans 59495971ee Properties: fixes to color swatches 2023-06-29 22:53:06 -04:00
Ian McInerney e17cd5abc6 Allow action description to be different from tooltip
The tooltip should be short and easy to read, the description can be
longer and more detailed.
2023-06-30 00:06:03 +01:00
Jon Evans 3487124a4a Properties: Improve color picker UX 2023-06-28 23:54:27 -04:00
Youbao 4cb993d872 ADDED: Cadence Allegro PCB Designer netlist exporter 2023-06-28 22:47:30 +00:00
Kuba Sunderland-Ober 1edb9bb0ce Get rid of VECTOR2U. 2023-06-28 20:48:07 +00:00
Jeff Young 216541c9a3 Fix typo in RunAction() declaration.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15067
2023-06-27 17:59:16 +01:00
Ian McInerney 2a940a5f70 Add COMMIT to TOOL_EVENTs instead of passing as a parameter 2023-06-27 00:57:59 +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
Steve Bollinger a318c57d77 Move E-series resistor selector table out of resistor value
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14627
2023-06-26 23:21:40 +00:00
Jeff Young 1b7473c353 Make sure Help menu is at end of menubar. 2023-06-26 14:11:13 +01:00
Jon Evans c7f6b20405 Properties: Use color picker dialog 2023-06-25 16:32:43 -04:00
Jon Evans a2ff3bce7d Properties: custom rendering for COLOR4D 2023-06-25 16:13:07 -04:00
Jeff Young f643a8f5bf Fix build on clang. 2023-06-25 16:01:35 +01:00
Jon Evans bf2e9f8261 Properties for SCH_LINE
Also rename an incongruous setter
2023-06-24 20:08:42 -04:00
Jon Evans 3a0f8214fa ADDED: Properties panel for schematic editor
Initial infrastructure work; follow-ons will add more
properties for schematic items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6351
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14105
2023-06-22 22:32:24 -04:00
Jon Evans 39a5929f33 Database libraries performance improvements
Rework caching system and optimize queries
2023-06-22 18:49:37 -04:00
jean-pierre charras 355575e477 Fix some (minor) issues when drawing shadow texts of RULER_ITEM and pin names.
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-06-22 13:28:43 +02:00
Ian McInerney 9f705f5e81 Return default initialized parameter when requested instead of assert 2023-06-21 20:39:50 +01:00
Jeff Young 0fde88eefc Protect custom rule function caches from transient items. 2023-06-21 18:14:41 +01:00
Ian McInerney 5d718617a2 Remove non-wx assert path to match rest of code
The WX_COMPATIBILITY mode is always assumed now (the option was removed
previously), but the define is no longer present. So remove the old code
that checked for it and just leave the wxASSERT statements.
2023-06-21 13:46:58 +01:00
Kuba Sunderland-Ober b60f7d4136 Make comparison operators const. 2023-06-21 08:49:26 +00:00
Marek Roszko 74d6dc6642 ADDED: Startup splashscreen
This is purely loading in the background based and has no artificial delay.
Will be more useful once kicad.exe ends up loading more on launch immediately ;)
Right now the splash is probably visible the longest launching pcbnew standalone.

The actual splash image can be considered a placeholder
2023-06-20 20:51:08 -04:00
Ian McInerney b0363023a5 Parameterize the tool manager RunAction function to ensure type stabilty 2023-06-20 21:52:50 +01:00
Ian McInerney 3718ecfcd8 Simplify forcing action parameters to have a specific type 2023-06-20 21:52:50 +01:00
Ian McInerney 9ebe6e7614 Update tool manager to handle the std::any parameters 2023-06-20 21:52:50 +01:00
Ian McInerney b04e54dbea Switch TOOL_EVENT and TOOL_ACTION to have a std::any parameter
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
2023-06-20 21:52:50 +01:00
Ian McInerney 0a22bb951c Add custom UI IDs to the action framework
This replaces a hack where the parameter was used to identify a custom
UI ID with a proper solution. This moves the cut/copy/paste actions to
the new system, but more like help/quit/close should also be moved over
in the future.
2023-06-20 21:52:50 +01:00
Ian McInerney b63bbdea5f Add function-chain contructor for TOOL_ACTION
A function-chain constructor method allows for the long list of
parameters to the constructor to be shrunk to only the ones needed by
each action, and allow self-documenting code for what each part of a
TOOL_ACTION constructor does.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7617
2023-06-20 21:52:50 +01:00
Mike Williams 85c633eb00 QA: PCB Fields bug fixes 2023-06-20 18:34:52 +00:00
Mike Williams 85f889bc19 Fields: Description now mandatory
Propagate from symbols to footprints, footprints keep a library
description, too. (GetLibDescription())
2023-06-20 18:34:52 +00:00
Mike Williams 993bb84240 PCB_FIELD: bug fixes 2023-06-20 18:34:52 +00:00
Mike Williams 7d84fa2a9d Validators: drop unused is m_isLibEditor 2023-06-20 18:34:52 +00:00
Mike Williams ddafa2e75d Common: move SCH_FIELD_VALIDATORS to FIELD_VALIDATORS
Fields are now common across PCB/SCH
2023-06-20 18:34:52 +00:00
Mike Williams 6d93950dcc PCB: abolish TEXT_TYPE::TEXT_is_*
PCB_TEXT is now always what was formerly TEXT_is_DIVERS and PCB_FIELDs
now what mandatory field type they are already.
2023-06-20 18:34:52 +00:00
Mike Williams 37837dc392 PCB: introduce PCB_FIELD_T 2023-06-20 18:34:52 +00:00
Jeff Young 40abb013ec Don't consider a group to be on a copper layer.
Its members can be on copper layers, but the group itself isn't on any
layer.

Also fixes a bug where we were trying to clone TRIANGULATED_POLYGON::TRI
shapes as indexable sub-shapes.  (The TRI only has indexes into its
parent, so cloning it will only result in segfaults down the line.)

Also fixes a bug where we weren't including copper items inside groups
when checking footprint net ties.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15021
2023-06-20 18:13:21 +01:00
Jeff Young 8c29091001 Add a "hyperzoom" mode for debugging "up close". 2023-06-20 14:19:21 +01:00
Jeff Young 0b58fdb910 Use KIUI to specify the simulation plot axis fonts.
Also fixes a bug in generating the x-axis for the first trace.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14997
2023-06-19 22:53:08 +01:00
Jeff Young 30336b2fe3 Unify go-back-one-step processing for drawing tools (and router).
Also warps mouse on all go-back-one-step operations for better feedback.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9985
2023-06-19 17:14:32 +01:00
Jon Evans 55c00f1845 ADDED: Initial support for importing Solidworks PCB files 2023-06-19 11:57:33 -04: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
Jon Evans b424dc11e1 Hotkey feedback for inactive layer display mode 2023-06-17 23:47:26 -04:00
Jon Evans fc69939190 ADDED: GUI feedback when grid setting is changed by hotkey
Can be extended to other cyclical hotkey settings

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-06-17 23:18:50 -04:00
Alex Shvartzkop 940f92a44f GAL: improve redraw handling, allowing higher refresh rates.
minRefreshPeriod can't be set in SwitchBackend because OpenGL isn't
initialized yet.
2023-06-17 12:42:22 +03:00
Jeff Young ef6866757e Treat undo as backspace and/or escape when drawing. Ignore redo.
Undo == backspace when drawing a polygon or chained lines.  Otherwise
it's an escape.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14961
2023-06-16 22:08:21 +01:00
Alex Shvartzkop f5da58e17d PAGED_DIALOG: allow setting initial size in ctor. 2023-06-16 18:53:00 +03:00
Jeff Young 75e78f9088 Move bitmap2cmp and pcb_calculator to tool framework.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1939

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7561
2023-06-16 15:37:58 +01:00
Jeff Young d8debfa0ee Require regular expressions to be explicit.
Normally this means surrounded by forward slashes, but we also still
allow any regular expression in a netclass match to keep from breaking
existing documents.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14944
2023-06-16 15:37:58 +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 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
Marek Roszko fd669773b6 Use guarded pages for coroutine stack on windows 2023-06-13 20:47:45 -04:00
Seth Hillbrand 6896148a10 Check for directory locking not file
When creating a new file lock, we need to check if the containing
directory can be written, not if the file (which may not yet exist) can
be written

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14942
2023-06-13 13:27:44 -07:00
Jeff Young 782c73300b Move drawing sheet datastructures to EDA_IU_SCALE.
Or mostly, at least.  Plotters still define their own mils-to-iu scale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14934
2023-06-12 22:34:25 +01:00
Jeff Young d6aefc458c Clear the playerFrame lookup cache when closing frames.
WindowIds aren't actually guaranteed to be unique, and we don't
perform a dynamic_cast on the result of FindWindowById() because
of linker issues....

This is an attempt to fix KICAD-39.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14928
2023-06-11 20:34:24 +01:00
Roberto Fernandez Bautista 3f758711fd Use external REPORTER for EESCHEMA_JOBS_HANDLER / PCB_JOBS_HANDLER 2023-06-10 23:35:32 +02:00
Jeff Young f66b9f75a3 Allow EDA_COMBINED_MATCHER use in KiCad find architecture.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12532
2023-06-10 14:50:06 +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
jean-pierre charras 47c0c7b3b7 pcb_calculator: add iec60664 electrical spacing panel.
From patches from by Fabien Corona and Aris_kimi
2023-06-07 12:01:30 +02:00
Jeff Young 9fe00bb808 Cleanup. No (intentional) functional changes. 2023-06-06 12:30:35 +01:00
Jeff Young f3d3ade1dc Increased mutex safety.
Don't even query the size() without having at least a shared_lock.

*May* prevent KICAD-4S, but seems unlikely.
2023-06-05 11:01:10 +01:00
Jeff Young 1528f4700c Treat canvas item as current when tree view contains no selection.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12702
2023-06-04 20:52:12 +01:00
Jeff Young 5875f89531 Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
Jon Evans 1aff03eadb Fix bitmap scaling for SPLIT_BUTTON 2023-06-03 12:41:40 -04:00
Jon Evans 8f69336ad1 Support DPI scaling in custom bitmap buttons 2023-06-03 11:32:52 -04:00
jean-pierre charras 9a47b34499 Replace PAD_SHAPE::RECT by PAD_SHAPE::RECTANGLE to avoid a collision NAME with a windows header on MSYS2, creating many compil warnings. No actual code change. 2023-06-02 12:18:24 +02:00
Marek Roszko 8eb265bf4c Add a central assert handler that generates sentry events 2023-05-31 21:56:59 -04:00
Seth Hillbrand 844226e6b9 Fix LOCKFILE fallback
`throw` needs to provide an actual std::exception or it will not be
caught
2023-05-31 17:01:31 -07:00
Seth Hillbrand 14f6e32c74 ADDED: Change watcher for libraries
When editing or viewing library symbols, the files are watched for
underlying changes.  If any occur, the user is either prompted to reload
(if reloading would overwrite their current edits) or the file is
silently updated to the current version on disk.

This also sets a custom assertion handler to avoid unneeded crashes when
recieving invalid SAMBA packets and turns off assertions entirely when
running in release (non-debug) mode
2023-05-31 13:46:00 -07:00
Seth Hillbrand d94fd5f979 Prevent ro directories from showing lockfile error 2023-05-31 13:45:57 -07:00
Jeff Young 421d6b2ef8 Retire LIB_ID_VALIDATOR as it prevents usage of text variables.
(We perform more complete checks in ERC anyway.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14764
2023-05-31 17:26:54 +01:00
Marek Roszko 6e468c5ce9 Fix more warnings
Needless const and out of order initializer
2023-05-29 23:01:58 -04:00
Roberto Fernandez Bautista a119bd604d Refactor: Move DIALOG_PLUGIN_OPTIONS to common and use enum for event ID 2023-05-28 23:56:41 +02:00
Jeff Young c71cf21e2f Use rendered text to generate bounding box for knockout text.
Don't open-code knockout text shape generation in several different
places.

Make sure triangulated knockout text gets clearance added when
specified.

Collapse duplicated footprint text item plot routine (they're no
longer any different from plotting pcb text items).
2023-05-28 17:20:11 +01:00
Jeff Young 95a09f686b Revert attempt to use drawing code to generate text bounding boxes. 2023-05-27 22:11:34 +01:00
Jeff Young f35a88ce0b Cache LIB_PIN text extents for performance.
Also fixes a bug where we didn't triangulate at all when the char
count didn't warrant the likely overhead of spinning up a
thread_pool.

And fix another bug where EDA_TEXT::GetRenderCache() wasn't using
the given font.

Also reverts using the cache for drawing-sheet text.  The text
items are created from scratch from the data items each time
they're drawn, so there's never an existing cache to make use of.
Instead, we now check that the item is in the view, using a very
approximate bounding box generator (because even generating a
real bounding box shows up large in profiles).

And, lastly, fixes a bug where EndPos was never considered in
DS_DATA_ITEM::IsInsidePage().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14822
2023-05-27 16:32:11 +01:00
Jeff Young cb53a18ee3 Bug fixes for handling boolean flags in DRC rules. 2023-05-26 18:44:33 +01:00
Jeff Young 768fbf5af2 Give up on trying to calculate text bounding boxes.
It results in too many hacks strewn through the code.  Just draw the
text and measure it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14803
2023-05-26 18:44:33 +01:00
Jeff Young 1518ddde74 Push much of text var autocomplete down into SCINTILLA_TRICKS.
Shared code == fewer bugs.  Well, in theory anyway....
2023-05-25 10:24:50 +01:00
Seth Hillbrand 122be418bb Upgrade file locking
wxSingleInstanceChecker is meant for running programs, not file locking.
This implements an RAII class for file locking that stores the lock
files next to the file being locked, allowing it to be easily found and
removed.  Also includes the ability to override the lock, with
information about the original owner

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14734
2023-05-24 13:51:54 -07:00
Wayne Stambaugh 24b04795fd Add net navigator panel to schematic editor.
[ADDED]: A panel to the schematic editor  that allows quick access to all
         of the items connected to the currently highlighted net.

This is an initial swag at implementing a full net navigator feature.  For
now it only shows the currently highlighted net nodes.  The incremental
net list advanced setting must be enabled in order to use this feature due
to performance reasons.  There are still some issues with saving the panel
position which will be addressed in the future.

Initial code for serializing wxAuiPaneInfo settings to and from JSON have
be implemented.
2023-05-20 13:48:03 -04:00
Jeff Young 8b1fd62d35 Make pad & via teardrops 1st-class citizens (props of the pad/via)
Change teardrop generation to rely more heavily on BOARD_CONNECTIVITY
for improved performance.

Add updating of teardrops on BOARD_COMMIT::Push().

Also converts m_CopperItemRTreeCache to std::shared_ptr.
We don't copy it around anyway, and having to create a new set
of std::unique_ptr's for each operation is likely to be more
expensive than std::shared_ptr's overhead.
2023-05-19 18:02:03 +01:00
Marek Roszko 3bf2fb2c0e Fix more C5266 warnings 2023-05-18 22:08:50 -04:00
Marek Roszko 573b66d243 Fix a bunch of C5266 warnings (pointless const on bool/int returns)
warning C5266: 'const' qualifier on return type has no effect
Microsoft doesn't even document C5266
2023-05-18 21:35:06 -04:00
Seth Hillbrand 0de24bfd59 Cleanup text alignment between version 6 and 7
Version 7 text alignment changed subtly for stroke fonts from version 6.
Additionally, the output has been different between screen and plotting,
leading to offset text in plotted output relative to the text shown on
screen.

This introduces a fudge factor in FONT::getLinePositions to correct the
offset in the plotting output relative to v6.

This also changes the SCH_PAINTER and PCB_PAINTER to correct the
relative offsets between GAL and PLOTTER classes.  The source of these
offsets is atm unclear.

Fixes https://gitlab.com/kicad/code/kicad/issues/14755
2023-05-17 13:33:49 -07:00
Seth Hillbrand 72267cf9b0 Adjust stroke font output to match v6 output
Many minor tweaks were added that changed the output of the stroke font
from v5/v6.  These offsets changed the gerber output expected.  This
reverts the changes to something much closer to the v6 output.  It is
not pixel-perfect but gets very close on most texts.

Fixes https://gitlab.com/kicad/code/kicad/issues/14609
2023-05-12 12:40:41 -07:00
Jeff Young daa3a1aae9 Revert addition of update-teardrops checkbox to DRC dialog. 2023-05-11 14:53:28 +01:00
Jeff Young ddc6ecf7be Lazy loading of Schematic Setup panels. 2023-05-11 11:43:10 +01:00
Jeff Young 9ae8255202 Insta-prefs. 2023-05-10 18:14:14 +01:00
Marek Roszko c7eaef2d13 Add missing footprint load progress, usually in schematic editor 2023-05-07 10:46:39 -04:00
Jeff Young b41d446f58 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Jeff Young df7d62fdd3 Added a sort-order dropdown to lib-tree filters.
Also simplifies the scoring algorithm so that it only
differentiates between exact-match, match-at-start and
any-match.  The rest of the position-based matching
stuff is gone, as is the knowledge of the name vs the
keywords vs the description.  All that is left to the
provider of the weighted search terms array.
2023-05-01 21:26:43 +01:00
Jeff Young bc754df30f Go back to winner-takes-all lib-tree scoring algorithm.
(Because we sort alphabetically there's no way to see
what the second-highest scored item was.)
2023-04-30 13:01:09 +01:00
Jon Evans dc847db19d Add initial support for database library settings UI
For now, just for diagnostic purposes (settings changes are not preserved)
2023-04-29 18:15:00 -04:00
Seth Hillbrand f4b43617e7 Add COMMIT structure to Schematic and Symbol editors
Provides a single-point access for modifying the schematic and symbol
elements that allows chaining updates and reverting partial changes.
Standardizes the undo hierarchy between pcb and schematic editors

As this is another layer on the existing undo/redo structure, the
initial commit does not replace all undo/redo calls currently existing.
These will be handled in a series of follow-on commits
2023-04-28 17:05:47 -07:00
Jeff Young 69500bfcaa LTSpice schematic import based on the work of Chetan Shinde. 2023-04-24 13:52:52 +01:00
Jeff Young c381b6d024 More robust file reading for simulator files. 2023-04-24 13:52:52 +01:00
jean-pierre charras 31b30cef96 OPENGL_GAL: draw BITMAP_BASE: fix incorrect rendering of mirrored bitmaps
The vertical mirror was not working.
2023-04-23 16:00:05 +02:00
Marek Roszko 6f70579c03 Add doxygen comments 2023-04-20 22:22:33 -04:00
Marek Roszko c5d5450f55 Create a central exception handler we can also use to generate sentry events 2023-04-19 20:38:25 -04:00
Seth Hillbrand a154571438 Add ability to update subgraphs based on changeset
Previously, almost all connectivity updates were full updates, meaning
that the entire connectivity graph would be rebuilt each time a change
was made to the schematic.  This update modifies the update to only
correct the subgraphs that are directly affected by the change.

It uses the existing connection graph to find all affected subgraphs as
well as connections to the changes based on the visible schematic.
These elements are removed from the existing connectivity graph and
marked dirty.  They then have a new connectivity graph built only around
their changes.  The resulting graph is merged into the original.

Currently, this ability is behind an advanced config flag
`IncrementalConnectivity` while testing.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1794
2023-04-19 16:14:35 -07:00
jean-pierre charras d4cf063e40 Fix a few more doxygen errors (no actual code change) 2023-04-19 20:24:42 +02:00
jean-pierre charras 1406341d2d Fix a few doxygen errors (no actual code change) 2023-04-19 16:20:24 +02:00
Marek Roszko ea077bc34d Banish ignore.h to core 2023-04-18 22:44:04 -04:00
Seth Hillbrand e6ab9a88ce Remove locks from settings
Settings should be initialized on start-up.  This removes the option of
lazily loading the settings from file and instead requires all settings
needed to be loaded on KiFACE start before requesting data from the
settings object
2023-04-18 13:40:25 -07:00
Jeff Young 7e5fedef6a Markup fixes.
1) allow escape sequences inside markup sequences
2) keep overbar when inside nested markup
3) always place overbar at full height, not sub/superscript height

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

Fixes https://gitlab.com/kicad/code/kicad/issues/13449
2023-04-17 17:56:54 +01:00
Jeff Young 6f59740953 Tighten up the lifecycle management of VIEW_ITEMs in
general, and the SYMBOL_VIEWER_FRAME's m_previewItem in
particular.

(Attempted fix for Sentry KICAD-G1.)
2023-04-16 14:21:23 +01:00
Jeff Young b74d964bff Handle legacy libraries with escaped symbol names.
Fixes https://gitlab.com/kicad/code/kicad/issues/14057
2023-04-15 17:47:32 +01:00
Marek Roszko 8fd4909f86 Init curl in InitPgm for thread safety
curl itself highly recommends not initializing curl from within a thread.
Due to the PCM, this can happen in a thread these days.

Pointed out by Érico Rolim in https://gitlab.com/kicad/code/kicad/-/merge_requests/855
2023-04-15 09:18:54 -04:00
Jeff Young 2d15067453 ADDED allow update of teardrops before running DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/14264
2023-04-15 12:18:41 +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 df5456bb5b Attempt to fix gcc compile error. 2023-04-13 13:57:48 +01:00
Jeff Young 8e29a054f3 Performance improvement for GetShownColumns.
(This needs to be fast as it's called from OnUpdateUI events.)
2023-04-13 13:45:22 +01:00
Ian McInerney a6be0eef4a Add const to a PGPROPERTY constructor to match upstream
The base class constructor expected a const string, and the other
PGPROPERTY constructors do as well, so make this const.

This was also a compile error when building against wx 3.3.
2023-04-12 18:57:12 +01:00
Ian McInerney f0684510f0 Replace wxScopedPtr with std::unique_ptr
Upstream has deprecated wxScopedPtr and recommends users switch to using
std::unique_ptr instead.
2023-04-12 18:57:12 +01:00
Jeff Young 66f48d56ae Separate sheet reloads (MODEL_RELOAD) and schematic reloads (SUPERMODEL_RELOAD).
Fixes https://gitlab.com/kicad/code/kicad/issues/14523
2023-04-12 11:51:09 +01:00
Jeff Young eef3492fc0 Make symbol/footprint trees sensitive to language change. 2023-04-11 23:51:58 +01:00
qu1ck a6d10c8e97 Enable warnings on msvc 2023-04-11 00:17:50 +00:00
Mike Williams 32eb1ef77e Sch->PCB: propagate DNP from symbols to footprints attributes
Also add a 3D viewer toggle.
2023-04-10 13:11:21 -04:00
Jeff Young a914f6e992 First <ESC> after an edit in a textEdit cancels the edit.
(Second will exit the dialog.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14514
2023-04-10 15:13:43 +01:00
Jeff Young 374d3d52ef Rollback wxChoice -> wxComboBox changes for now.
wxComboBox still has serious issues on macOS.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/14413
2023-04-09 23:00:33 +01:00
Ian McInerney 07d613d0d2 Subclass wxDataViewCtrl to include our helpers
It is cleaner to just extend the class with these functions rather than
having the separate functions.
2023-04-08 00:07:33 +01:00
Seth Hillbrand 2cd854af14 Move Spacemouse to advanced config
The spacemouse driver, particularly on Mac, is extremely unstable and
causes crashes even when not being used.  This places the interface
behind an advanced config flag to ensure that users can affirmatively
opt-in to the potential for crashes
2023-04-07 10:08:43 -07:00
Ian McInerney 18ea3be3f2 Revert "Reintroduce constexpr to COLOR4D"
This reverts commit 33da9b2327 and the
following commit dc08c48f33.

C++17 changed the behavior of static class member variables that are
constexpr defined. Previously this definition/declaration split was
valid for constexpr members, but after C++17 the static constexpr member
variables are automatically inlined, so the declaration is no longer
exported in some compilers (GCC 9/10/11 seem to have problems).

An alternate way of constexpr member variables is putting the
initialization in the class definition, but we can't init a COLOR4D
object when defining the COLOR4D class.

For now, revert this change until we can figure out the proper way of
architecting these colors.
2023-04-06 20:18:31 +01:00
Ian McInerney 311d5d5e26 Remove unused container header 2023-04-06 15:01:18 +01:00
Ian McInerney ea62b145ff Introduce core interface library
This library is meant to move non-EDA items (language extensions,
library extensions, etc.) into the lowest-level of our dependency chain.
This library should never depend on anyother non-thirdparty code in the
kicad codebase.
2023-04-06 15:01:18 +01:00
Wayne Stambaugh b05de51a8d Fix a few Coverity issues. 2023-04-06 08:48:02 -04:00
Ian McInerney 33da9b2327 Reintroduce constexpr to COLOR4D
This fixes the initialization-order fiasco in the color initialization
sequence, which was originally fixed by making COLOR4D constexpr, but
was then reintroduced when the assert was changed to wxASSERT (wxASSERT
is not compatible with constexpr).
2023-04-05 14:07:01 +01:00
Wayne Stambaugh c3e6825d62 Add hashing to and unit tests for some low level objects. 2023-04-04 15:28:34 -04:00
Jeff Young 9b4627e782 Don't pass a FRAME-based UNITS_PROVIDER to a modeless dialog.
(The dialog may outlive said frame.)
Should fix Sentry KICAD-3A.
2023-04-03 17:18:33 +01:00
Mike Williams 9c3d93eb34 BOM Generator: wire up forced exclusion, optional DNP exclusion 2023-04-03 09:07:52 -04:00
Mike Williams c5cc313da9 Symbol Fields Table: BOM presets saved in JSON settings 2023-04-03 09:07:52 -04:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Wayne Stambaugh 28776f5745 Text attributes object improvements.
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
2023-03-29 12:53:45 -04:00
Jon Evans 65193487a6 Properties: Rename methods to better reflect their purposes 2023-03-26 19:43:16 -04:00
Wayne Stambaugh a79108f102 Fix GCC compile error. 2023-03-25 11:22:11 -04:00
Marek Roszko ab28650d57 Use read/write locks in the settings_manager to avoid thread issues in some scenarios
Fixes sentry issue KICAD-90
2023-03-25 10:46:14 -04: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
Seth Hillbrand 19d0aceda3 Remove superfluous m_status variable
This used to be used to store information for the item similar to
m_state but it has been deprecated and no uses remained
2023-03-24 09:38:39 -07:00
Wayne Stambaugh 244c37298f Fix Doxygen commenting issues. 2023-03-24 11:57:52 -04:00