Commit Graph

7547 Commits

Author SHA1 Message Date
Jeff Young 2e2264cb74 Minor cleanup. 2022-08-09 08:46:12 +01:00
Marek Roszko f695ae5522 Generate const keyword_hash maps at compile time
Or else the map gets pointlessly recreated during footprint loading thousands of times
2022-08-09 00:56:49 -04:00
Jeff Young a11f48ef10 Markers provider is no longer responsible for all markers.
Unconnected items and schematic partity violations are also now
represented by markers, so the ERC/DRC window itself needs to do
the deep-delete.

Fixes https://gitlab.com/kicad/code/kicad/issues/12182
2022-08-08 22:02:20 +01:00
Jeff Young 51b905ba32 Move Configure Paths help inside dialog.
This allows us to switch back to a standard modal dialog (instead of
quasi-modal, which has problems with Ctrl-V in a search box inside a
standard file dialog -- such as when picking a path).

Fixes https://gitlab.com/kicad/code/kicad/issues/9473
2022-08-07 11:28:16 +01:00
Jeff Young 5c9aed62aa Use wxWidgets IDs for cut/copy/paste.
This allows them to work in places like search boxes in standard file
dialogs.  If wxWidgets doesn't find the standard IDs in our menus
then it won't enable them.
2022-08-07 11:28:16 +01:00
Jeff Young 509d233d97 Fix knockout text bounding boxes and hit testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/12133
2022-08-06 00:00:04 +01:00
jean-pierre charras d0d19423e0 Eeschema: Try to fix bitmap printing in wx version > 3.1.5
We had on a regular basis problems when printing bitmaps.
Probably due to issues in wx and in our code.
2022-08-04 14:25:52 +02:00
Jeff Young e4b6da287f Fix errant string format char. 2022-08-03 14:27:56 +01:00
Jeff Young 96f01d33c8 Performance improvements.
1) Move a bunch of std::map's to std::unordered_map to get constant-time
look-ups
2) Lengthen progress-reporting intervals to spend more time doing work
and less time talking about it
3) Reverse order of SHAPE_LINE_CHAINs in thermal intersection checks to
make (much) better use of bbox caches
4) Don't re-generate bboxes we already have
5) Fix some autos that weren't by reference (and were therefore copying
large datasets)
6) Rename delta progressDelta so it's easier to search for in future
7) Get rid of a few more autos (because I don't like them)
8) Pass large items to lambdas by reference

Fixes https://gitlab.com/kicad/code/kicad/issues/12130
2022-08-03 11:59:42 +01:00
Jeff Young 0304ad4494 Move connection width testing to rule system.
Also copies connection width progress reporting architecture over to
the sliver checker.
2022-08-01 13:09:51 +01:00
Jeff Young 6f49b57f9b Cleanup & performance enhancements. 2022-08-01 13:09:51 +01:00
jean-pierre charras d1ff8f4781 PROGRESS_REPORTER_BASE: call code to resize it only if the message has change.
In wxWidgets 3.15 (and perhaps older version) the call to GetTextExtent() probably
creates major issues when called too many times, at least oo msys2.
It was probably also time costly.
Calling it and resize the PROGRESS_REPORTER only when needed fixes these serious issues.
Issues happened only when the board has a lot of zones (when teardrops are added)
2022-08-01 13:18:50 +02:00
jean-pierre charras 32551cf1ea minor coding style fix. 2022-07-31 18:35:37 +02:00
jean-pierre charras 4bfbf91369 3D viewer: Fix incorrect behavior when moving the scene
Fixes #12114
https://gitlab.com/kicad/code/kicad/issues/12114
2022-07-30 13:27:25 +02:00
Mikolaj Wielgus 7cf5138c63 Sim: Bugfixes, mostly for MS Windows compilation errors
Unfortunately, Windows headers define a lot of macros for common words,
so we had to rename some enums to not collide.

We also fix some of the many bugs related to the new simulation
architecture and the Spice Model Editor dialog.
2022-07-30 02:25:34 +00:00
Marek Roszko a8505d9c76 SEARCH_RESULT -> INSPECT_RESULT
To fix the name squatting it's doing for future functionality
2022-07-29 20:01:10 -04:00
jean-pierre charras 490875e222 Fix a missing call to aEvent.Skip() in commit 753f2f3.
Any wxSizeEvent handler must call Skip() to propagate the event.
2022-07-29 16:46:35 +02:00
jean-pierre charras 905df71977 Fix an issue when printing bitmaps when not on wxWidgets 3.1.6 and 3.1.7
Commit 6e35d5473 added a hack to fix an issue on wxWidgets 3.1.6. But this hack
must by applied to 3.1.6 and 3.1.7, not to other versions.
Modify commit 048cf6df that applied the fix to 3.1.6 only
2022-07-29 13:09:20 +02:00
jean-pierre charras 048cf6df7a Fix an issue when printing bitmaps when not on wxWidgets 3.1.6
Commit 6e35d5473 added a hack to fix an issue on wxWidgets 3.1.6. But this hack
must by applied only to 3.1.6, not to other versions.
Fixes #12108
https://gitlab.com/kicad/code/kicad/issues/12108
2022-07-29 10:26:45 +02:00
Jeff Young 753f2f3e4c Display descriptions in second column of library trees.
Also fixes some bugs in how the columns are sized.

Fixes https://gitlab.com/kicad/code/kicad/issues/12090
2022-07-28 14:51:47 +01:00
Seth Hillbrand ee8116e55f Protect against double-refresh
The wxtimer can fire multiple times and there exists the possiblity for
this to happen before the flags are properly set to prevent it.  This
creates a concurrency mutex to skip the EDA_DRAW_PANEL_GAL refresh if
one is already underway.

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

(cherry picked from commit 39dd51490d)
2022-07-27 20:28:48 -07:00
Jeff Young bb43d923af Save preferences immediately (in case of future crash).
Fixes https://gitlab.com/kicad/code/kicad/issues/11162
2022-07-27 18:57:45 +01:00
Jeff Young 4a40d94b5a More hotkey label cleanup. 2022-07-27 12:29:01 +01:00
Jeff Young 6e0d31b812 Improve grid tooltip.
Fixes https://gitlab.com/kicad/code/kicad/issues/9841
2022-07-27 12:29:01 +01:00
Jeff Young d9d579c895 Clean strings before displaying in hotkeys list.
Also make sure the description column is wide enough.

Fixes https://gitlab.com/kicad/code/kicad/issues/11994
2022-07-27 12:29:01 +01:00
Mike Williams ece9a782ac Gerbview: unexceptional exception cleanups 2022-07-26 18:42:55 +00:00
Mike Williams be7104c24c Gerber Viewer: gerbview -> Gerber Viewer in Settings 2022-07-26 18:42:55 +00:00
Seth Hillbrand 2245e99a89 Apply Wayne's suggestion for better error recov
No need to exit the draw routine on a bad layer, we can skip that layer
and continue processing the valid elements
2022-07-26 11:06:29 -07:00
Jeff Young c3a5947fe6 Make Scintilla paste a separate undo operation.
Fixes https://gitlab.com/kicad/code/kicad/issues/11756
2022-07-26 18:45:02 +01:00
Seth Hillbrand 008b4f583b Fix typo in lib_text layer id
Also adds CHECK_RET to catch similar errors in the future

Fixes https://gitlab.com/kicad/code/kicad/issues/12078
2022-07-25 17:08:16 -07:00
jean-pierre charras 993c446fdf Fix some warnings detected by PVS-STUDIO (most are not used vars) 2022-07-25 18:23:52 +02:00
Jeff Young e10158ff10 ADDED show pin names on footprint pads when assigning to symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/4576
2022-07-24 23:41:41 +01:00
Jeff Young 582c133835 CSV escaping. 2022-07-24 23:41:41 +01:00
Jeff Young 6eada34f41 Use "Cancel" for cancel semantics, even when affirmitave to question.
Fixes https://gitlab.com/kicad/code/kicad/issues/11983
2022-07-24 08:47:01 +01:00
Jeff Young 74b9ff5865 Don't specify a severity when traversing the filtered list. 2022-07-24 08:41:02 +01:00
Jeff Young def87c969e Redo the pinned-libraries storage architecture.
1) always use preferences directly
2) allow nicknames from either preferences or project
3) store-after-modify

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

Fixes https://gitlab.com/kicad/code/kicad/issues/11892
2022-07-22 09:31:10 +01:00
Marek Roszko 47fe8ff8eb bitmaps and template are resources. 2022-07-21 20:14:10 -04:00
luz paz 79fa911e0e Fix various typos
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-07-21 16:31:41 +00:00
Jeff Young 7386e64923 Attempt to work-around wxWidgets bug with Serbian & Russian locales.
Fixes https://gitlab.com/kicad/code/kicad/issues/12002

Fixes https://gitlab.com/kicad/code/kicad/issues/11963
2022-07-20 17:52:48 +01:00
Jeff Young e5a664c6b3 Try a slightly different tack for cancelling net highlighting.
Fixes https://gitlab.com/kicad/code/kicad/issues/12029
2022-07-19 10:31:49 +01:00
Seth Hillbrand 0335df77fa Ensure global tooltip is created for each app 2022-07-18 17:08:48 -07:00
dsa-t e2e574c84d Fix a mistake in EDA_RECT::Intersects. 2022-07-18 18:51:52 +00:00
Jeff Young b727bfc16d Performance: avoid sqrt at all costs. 2022-07-16 18:42:32 +01:00
Alex ebbfc25420 Don't evaluate arguments passed to KI_TRACE if tracing is disabled. 2022-07-16 17:35:22 +00:00
Jeff Young d0547cbde7 Don't allow 0 line-width for unfilled shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/12010
2022-07-16 16:26:05 +01:00
Seth Hillbrand db4f2d9dd8 Catch some crashes on shutdown
These can happen when a tool is active that sends signals when exiting
(e.g. deselectEvent).  These may be caught by the active loop in another
tool which might try to update the UI after it has been freed.  By
marking all tools as "shutdown", the only event returned to them should
be null.  As an extra precaution, we flag the shutdown globally within
the tool manager and check this flag before launching either events or
new tools

Fixes https://gitlab.com/kicad/code/kicad/issues/10698
2022-07-15 16:56:01 -07:00
Seth Hillbrand b792a3f3f5 Add angle display to line drawing
Helpful to see what angle you are at when setting graphic lines
2022-07-15 12:03:11 -07:00
Seth Hillbrand bed38d2fc8 Stroke, don't fill fonts in preview
Fixed new vector-style font display to avoid the non-closed polyline
fills that make it hard to read the proper text

Fixes https://gitlab.com/kicad/code/kicad/issues/11781
2022-07-15 11:58:33 -07:00
Seth Hillbrand 595e5cb3f2 Add sort feature to pre-defined list
Board setup rows should be sortable when inserting new elements.  They
get sorted when saving, this keeps that representation while editing

Fixes https://gitlab.com/kicad/code/kicad/issues/12015
2022-07-15 11:16:15 -07:00
Seth Hillbrand 9faff78258 Keep the reset text correct
Ensures that after setting the initial dialog page, we also set the
proper text in the reset button as the event does not get fired

Fixes https://gitlab.com/kicad/code/kicad/issues/11856
2022-07-14 14:19:09 -07:00