Commit Graph

37450 Commits

Author SHA1 Message Date
Wayne Stambaugh 228927b4e9 Tag stable release candidate 7.0.6-rc1. 2023-06-17 19:33:44 -04:00
Seth Hillbrand 6fc393c7db 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

(cherry picked from commit 122be418bb)
2023-06-18 01:06:40 +02:00
Seth Hillbrand 361fdcce1b 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

(cherry picked from commit 48ecd742eb)
2023-06-18 01:06:14 +02:00
Jeff Young 12cf696097 Tab-order fix provided by aris-kimi.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9406
2023-06-17 18:34:52 +01:00
Jeff Young e7ae6cd190 Recompute intersheet refs while printing.
Also fixes a bug where the schematic offset wasn't being added to
intersheet refs when printing.

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

(cherry picked from commit e3eb0abc5f)
2023-06-17 18:12:44 +01:00
Jeff Young 61dfe4ef07 Don't leave selection lying around when swapping out footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14971

(cherry picked from commit da558f57d4)
2023-06-17 17:30:24 +01:00
Jeff Young d3099ecf75 Don't create 22.5-degree gateways if we're not cardinal or diagonal.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14984
2023-06-17 16:05:07 +01:00
Jeff Young c183e3f342 Cleanup. 2023-06-17 16:04:56 +01:00
Alex Shvartzkop a5ded3341a Adapt panels to PAGED_DIALOG sizing algorithm.
Also some cosmetic fixes (GTK).

(cherry picked from commit d3be62f644)
2023-06-17 15:19:26 +03:00
Alex Shvartzkop bb15c56a2d PAGED_DIALOG: make sure the dialog is big enough to contain page.
(cherry picked from commit 6ace80700e)
2023-06-17 15:19:26 +03:00
Alex Shvartzkop c61931996a PAGED_DIALOG: allow setting initial size in ctor.
(cherry picked from commit f5da58e17d)
2023-06-17 15:19:26 +03:00
Alex cb6c91be06 Center calculator grid cells, sync font styles with fbp.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14743

(cherry picked from commit d945b76c65)
2023-06-17 15:19:26 +03:00
Alex bfcdec47c1 Move bitmap setup to ctor in eeschema annotation options.
(cherry picked from commit 26c25c5475)
2023-06-17 15:19:25 +03:00
Jeff Young c0445ed857 Reset session drawing props after Board Setup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14932

(cherry picked from commit 9ed2458f00)
2023-06-17 13:04:48 +01:00
Wayne Stambaugh 4e79d1ecdd Command line PCB gerber export fix and improvement.
The --board-plot-params argument was never parsed so it was always ignored.

[ADDED] A '--no-protel-ext' option to allow plotting gerbers with the KiCad
        file extension (gbr) instead of the Protel gerber file extensions.
2023-06-16 07:14:37 -04:00
jean-pierre charras 4306af3ef3 Plot Solder mask layer: do not add items on edge_cut, but not on mask layer
it happened only when creating a solder mask plot with a minimum thickness.
This was a legacy option, incorrect now.
Fixes #14960
https://gitlab.com/kicad/code/kicad/-/issues/14960
2023-06-16 10:01:29 +02:00
Jeff Young a01f9f99f4 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).

(cherry picked from commit 46564055f4)
2023-06-14 13:57:27 +01:00
Alex Shvartzkop 08186f4131 Fix lock condition in GL_CONTEXT_MANAGER, remove unnecessary assert.
Assert handler is already being called from wxCHECK.


(cherry picked from commit dfb05c4f4b)
2023-06-14 04:46:06 +00:00
jean-pierre charras bdc9807dee Pcbnew: fix crash when selecting a footprint due to a not initialized pointer 2023-06-13 11:37:12 +02:00
Marco Ciampa d77180d9b5 Small fix in Italian translation 2023-06-12 14:32:55 +02:00
Jeff Young b0bcaa971e BoardDesignSettings are owned by FOOTPRINT_EDITOR_SETTINGS in the FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14925
2023-06-12 10:08:09 +01:00
jean-pierre charras 4294202074 gr_basic.cpp: ensure a pen with width = 0 is transparent.
Setting its color to COLOR4D::UNSPECIFIED (i.e. opacity = 0) is not enough
for all  platforms (i.e. Windows)
From master branch
Fixes #14915
https://gitlab.com/kicad/code/kicad/-/issues/14915
2023-06-12 08:45:01 +02:00
Jeff Young 1e013274c2 Fix broken build. 2023-06-11 22:35:54 +01:00
Jeff Young 39c7024f12 Make sure infobar gets created earlier.
(restoreLastFootprint() might want it.)

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

(cherry picked from commit 3159391e28)
2023-06-11 22:32:05 +01:00
Jeff Young 375f3a7164 Remove double call to Destroy() for DISPLAY_FOOTPRINTS_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14928

(cherry picked from commit bae8a077b9)
2023-06-11 22:31:27 +01:00
Jeff Young 370bdef8d0 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

(cherry picked from commit d6aefc458c)
2023-06-11 22:31:24 +01:00
Jeff Young 7b1e75e6ed Don't accidentally add NULL ptrs to the LibSymbols cache.
Operator[] will add a blank element if it isn't found in the map.

Probably Sentry KICAD-23Y.

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

(cherry picked from commit 96073402ce)
2023-06-11 22:31:18 +01:00
Jeff Young 5c1a089981 Re-create missing exclusion markers if DRC was cancelled.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14919

(cherry picked from commit 93789e75b9)
2023-06-11 22:31:13 +01:00
Jeff Young cfb59094fe Make sure infobar gets created earlier.
restoreLastFootprint() might want it.

(cherry picked from commit 4fc6047f91)
2023-06-11 22:30:43 +01:00
Jeff Young 7d30a2bc54 Make FOOTPRINT_PREVIEW_PANEL a FPHOLDER.
Also makes sure it get its user_units set up.

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

(cherry picked from commit d18b0c62f6)
2023-06-11 22:30:16 +01:00
Jeff Young 472879e95a Check for proxy references and values in Selectable().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14911

(cherry picked from commit 111d0a2c14)
2023-06-11 22:07:26 +01:00
CraftedNightmare 7027d02f94 Fix Search pane not remembering docking sizes and positions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14120


(cherry picked from commit d94e9b31b1)
2023-06-11 20:24:41 +00:00
Salvador E. Tropea 561441b48a Adds the missing plot formats to `kicad-cli sch export` 2023-06-11 13:56:24 -04:00
Jon Evans fe5c7a60ab Net Inspector: clear sort ordering during rebuild
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14697


(cherry picked from commit 3a2cc8f56f)
2023-06-11 17:16:57 +00:00
Alex Shvartzkop 1a3dc72af8 Avoid deadlock when OpenGL context can't be created.
Previously, with aContext == nullptr, the mutex would lock, but not unlock.
Then it got deadlocked inside OPENGL_GAL dtor.

(cherry picked from commit eaf65f7d53)
2023-06-11 20:12:22 +03:00
Nils VAN ZUIJLEN c919694f37 cli: add an option to the pcb exports for plotting negative svg and pdf
ADDED: The -n or --negative option for exporting negative svg or pdf plots
from kicad-cli. Example usage: kicad-cli pcb export svg -n -l B.Cu board.kicad_pcb
2023-06-10 14:50:27 -04:00
Jeff Young 6fbdf8f0e2 Handle Altium dimension angles and non-unit suffixes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13751

(cherry picked from commit 97cf7c874e)
2023-06-10 10:57:14 +01:00
Jeff Young 4060ec3038 Treat canvas item as current when tree view contains no selection.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12702

(cherry picked from commit 1528f4700c)
2023-06-10 10:57:14 +01:00
Jeff Young 32626970a0 Prevent Sentry KICAD-MM crash.
It'd be nicer to know what happens, but we don't have a reproducible
case, so this "fix" will at least prevent that particular crash.

(cherry picked from commit 0091b9f897)
2023-06-10 10:57:14 +01:00
Jeff Young bc0a53a226 Increased mutex safety.
Don't even query the size() without having at least a shared_lock.

*May* prevent KICAD-4S, but seems unlikely.

(cherry picked from commit f3d3ade1dc)
2023-06-10 10:57:14 +01:00
Jeff Young b6a044111b Exclude redraws during closing (particularly of RATSNEST_VIEW_ITEM).
(cherry picked from commit 7a3a8b67c1)
2023-06-10 10:57:14 +01:00
Jeff Young 3c4286c98b Force re-word-wrapping of PCM package descriptions on Mac.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13328

(cherry picked from commit c7730eae3f)
2023-06-10 10:57:14 +01:00
Jeff Young 6d996e31b8 Don't dim SCH_FIELDs when selecting them.
(They were only getting drawn on top of the selection shadow when
drawn by their parent symbol because LIB_FIELD was correctly
setting the view layers but SCH_FIELD was not.)

(cherry picked from commit 2300b0d2a3)
2023-06-10 10:57:14 +01:00
Jeff Young ec4faad589 Don't allow setting a pad width or height of 0.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14278

(cherry picked from commit ddd2cb005b)
2023-06-10 10:57:14 +01:00
Alex 13820bc002 Support --mirror option in "kicad-cli pcb export pdf"
(cherry picked from commit 2450435131)
2023-06-10 04:58:07 +03:00
Alex 6ad9f25e7d Enable support for KICAD_SANITIZE_ADDRESS CMake flag on MSVC.
(cherry picked from commit d5edde799c)
2023-06-09 23:10:44 +00:00
Jeff Young a348fde7d1 Assertion checking for hole/parent ownership mismatch.
(This mismatch is the root of the problem in issue #14852.)
2023-06-10 01:05:00 +02:00
Tomasz Włostowski d25017dd5b router: can't add a clone of a VIA's hole when adding the via to INDEX - this will result in bogus colliding objects
This commit partially reverts deb3cbf8. VIA and SOLID operator='s introduced in it do a good job but the cloning of holes in addHole() causes bogus collisions.
2023-06-10 01:04:49 +02:00
Jeff Young 9b965f367a Prevent use-after-free crashes by not fighting over who owns a HOLE.
The diff-pair placer creates DIFF_PAIRs on the stack, which have
VIAs in them, which have HOLEs in them.  The HOLEs get put in the
NODE's index, and we then crash later when doing a collision after
the stack variable has gone out of scope.

The stack variable is also copied while doing a search for "best",
and without the operator= definitions the "best" and the "original"
both think they own the HOLE.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14852
2023-06-10 01:04:37 +02:00
Tomasz Wlostowski adca34ac6a router: invalidate items freed by PNS::NODE in the clearance cache
This was causing intermittent shove hiccups/freezes as RULE_RESOLVER::GetClearance() could return a bogus clearance value, taking
a cached value for an item that does not exist anymore. If the allocator/stack accidentally reclaimed such item's address - we were getting
very nasty and difficult to reproduce misbehaviours of the shove algorithm. Hopefully this patch fixes this. More info in the comments.

Note to self - I'm still not fully convinced I want PNS::ITEM pointers as the cache key, probably a unique counter would be better here.
2023-06-10 01:04:25 +02:00