Commit Graph

14980 Commits

Author SHA1 Message Date
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
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
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
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 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
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
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 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
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
Tomasz Wlostowski 51a4a92ec4 router: fix use-after-free crash in drag walkaround mode 2023-06-10 01:04:13 +02:00
Tomasz Wlostowski ae8ea3b938 router: correctly assign owner via/pad to its hole when committing the world state
fixes #14852
2023-06-10 00:27:38 +02:00
David Holdeman 6a00eaa4a3 naively add option 2023-06-06 18:20:24 +00:00
Jeff Young 214f785c97 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).

(cherry picked from commit c71cf21e2f)
2023-06-06 11:19:41 +01:00
Marek Roszko d6fd5598ab Use the correct printf format for the move individually status text
Fixes sentry KICAD-1ZT


(cherry picked from commit b41606ecf7)
2023-06-05 13:55:52 +00:00
Mike Williams c3a6bf3d40 UI: Add Numpad Enter as "Return" equivalent in missing places
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14244
2023-06-05 08:58:50 -04:00
Jeff Young 0bd45f691e Make sure 3D file browser is treated as modal by quit.
(Otherwise we crash when freeing it during the quit.)

(cherry picked from commit c36b0fcda7)
2023-06-04 21:22:19 +01:00
Jeff Young e76a520c19 Bug fixes for handling boolean flags in DRC rules.
(cherry picked from commit cb53a18ee3)
2023-06-02 00:20:11 +01:00
jean-pierre charras e55263be00 Pcbnew: fix crash when trying to save a board with a text with overbar and
using a non Kicad font
PCB_PLUGIN::formatRenderCache() was considering all shapes in cache are polygons,
but this is not true: some items can be stroke shapes.
From stable branch
Fixes #14804
https://gitlab.com/kicad/code/kicad/-/issues/14804
2023-05-29 20:41:35 +02:00
Jeff Young 4a274709e7 Go back to using QuasiModal for TextBox Properties.
Also removes auto-closing of blocking dialogs when inserting
symbols from the Symbol Editor or Chooser, preventing the bug
that QuasiModel was removed for earlier.

Also fixes a non-initialized parent pointer when the TextBox
Properties dialog was called from DrawShape().

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

(cherry picked from commit 5a9ed66cfd)
2023-05-28 19:19:50 +01:00
Jeff Young c6e4f18d99 Hook up text variable auto-complete for PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777

(cherry picked from commit 14f004d2a5)
2023-05-28 18:46:39 +01:00
Wayne Stambaugh 0e5155ae2f Fix clipped combobox entry in board editor text box dialog.
The layer combobox color swatch was clipped when the combobox was
closed when the dialog was launched.  Setting the minimum width
resolved the issue.  This may have been a GTK only issue.

(cherry picked from commit a13a49f45a)
2023-05-28 18:43:32 +01:00
Jeff Young dfd11b7596 Reconcile PNS router with DRC.
Hole-to-hole is only for drilled holes.
NPTH slots also get EDGE_CLEARANCE applied.

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

(cherry picked from commit df763eaf88)
(cherry picked from commit ad9109cad4)
2023-05-28 19:38:27 +02:00
Jeff Young b728251bcc STL is your friend... until it's not.
Operator[] was creating an empty entry in the connectivity map,
fooling us into thinking the item had already been added.

Worryingly, this bug has been in there since 2017; a recent
change in teardrops just happened to expose it.

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

(cherry picked from commit 7e51077992)
(cherry picked from commit 0d94532df9)
2023-05-28 19:38:27 +02:00
Jeff Young 97ffb60f23 Don't consider shorted items when opitmizing ratsnest.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14715

(cherry picked from commit 80aef37cc4)
(cherry picked from commit dc50b7b065)
2023-05-28 19:38:27 +02:00
Jeff Young 41b7182661 Lazy loading of stackup UI widgets.
(cherry picked from commit 9481a218c7)
(cherry picked from commit 00a82905ec)
2023-05-28 19:38:27 +02:00
Jeff Young 19e5a231a7 Don't run onPageChanged() event handler during initialization.
(cherry picked from commit 3f44c811c7)
(cherry picked from commit f35ed59868)
2023-05-28 19:38:27 +02:00
Jeff Young 01fcb2276b Move remainder of Board Setup to lazy loading.
(cherry picked from commit 03c9b1c202)
(cherry picked from commit 3cd87c2a44)
2023-05-28 19:38:27 +02:00
Jeff Young 19b4e98ee7 Lazy loading of Schematic Setup panels.
(cherry picked from commit ddc6ecf7be)
(cherry picked from commit 6cbc10db81)
2023-05-28 19:38:27 +02:00
Jeff Young 77c76bbc8a Insta-prefs.
(cherry picked from commit 9ae8255202)
(cherry picked from commit 4c28070449)
2023-05-28 19:38:27 +02:00
jean-pierre charras 50ec496c54 Step exporter: export circular board outlines as cylinder
From master branch, commit 66651327.

(cherry picked from commit 5db9a6af9d)
2023-05-28 19:38:27 +02:00
Tomasz Wlostowski 0180cb380f router: prevent pushout/bogus collision of via with is own hole (or copper) when dragging
The root cause was not removing the original (pre-dragging) via from the world, comparing the ITEM::Parent() pointers of the items was only hiding the main issue.
This also fixes the PNSViaCollisions test in the qa/ suite.
2023-05-24 19:47:20 -07:00
Jeff Young 882e48b457 Don't allow collisions with self.
The previous test didn't handle is-self-tests between a hole and
its override in a different NODE.  When calculating the pushout
force we don't remove the via (and its hole) from the current
node until after the calculation, so we end up checking for
collisions between the new (cloned) via's hole and the original
hole in the root node.

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

(cherry picked from commit b442d769fd)
2023-05-24 08:54:27 -07:00
Seth Hillbrand fa56b17c88 Revert "Fix clipped combobox entry in board editor text box dialog."
This reverts commit 7ea907c343.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 84eacd13a1 Revert "Step exporter: export circular board outlines as cylinder"
This reverts commit 5db9a6af9d.
2023-05-24 08:54:16 -07:00