Commit Graph

15031 Commits

Author SHA1 Message Date
jean-pierre charras 8625a59d4c Fix a display issue in wxStyledTextCtrl widgets in dialogs (Windows specific).
It happens when a text is using some esoteric unicode chars.
Fixes #15314
https://gitlab.com/kicad/code/kicad/-/issues/15314
2023-08-03 18:44:57 +02:00
Jon Evans 9ac5f837f7 Properties: disable pad y-size when circular
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15038


(cherry picked from commit 39073642a7)
2023-08-03 13:07:52 +00:00
Jon Evans 228fe71eb4 Do not force focus on dataview in RC dialogs
On GTK, this causes the first item to be selected, firing the
selection handler and causing unwanted side effects.

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


(cherry picked from commit 7804c2177c)
2023-08-03 13:06:37 +00:00
Ian McInerney 80462cf559 Remove temp items from its group before deleting them
The 1st level items being copied don't have their group information
copied, and we assert that it has been removed from the group on
deleting it, so we just reset the group membership to prevent the
assert.

Fixes sentry KICAD-22S
(Cherry-picked from 753cc6679b)
2023-08-02 23:32:45 +01:00
Ian McInerney b0f4d56de1 Remove group association before plotting board outline in drill map
The plotter doesn't care about the grouping, and we expect the item to
have no group on deletion, so temporary items like this shouldn't be
part of one.

(Sentry issue KICAD-24Y)
(Cherry-picked from 137640ac28)
2023-08-02 23:26:35 +01:00
Ian McInerney 7bc0f8731f Remove group reference when exporting individual footprints
(Cherry-picked from d923b871d7)
2023-08-02 23:21:36 +01:00
Ian McInerney 507054e9cd Remove temporary footprint from pcb group before deletion
Bounding box computation uses a temporary footprint, but the clone
operation keeps the group information. We can't delete a footprint if it
has group information, so just delete the group information.

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

(Cherry-picked from b8e9544828)
2023-08-02 23:17:03 +01:00
jean-pierre charras 74fc8f6db0 APPEARANCE_CONTROLS, preset layers: re-allow storing object visibility in
a User preset, and use the last defined object visibility when switching to
a builtin preset
From master branch
Fixes #15282
https://gitlab.com/kicad/code/kicad/-/issues/15282
2023-08-02 14:01:43 +02:00
Jon Evans 04bb3dfe9d A BOARD may not always have a project
For example, if it's the footprint editor model

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


(cherry picked from commit 2459949d0d)
2023-08-01 21:26:01 +00:00
jean-pierre charras 7fb15269d1 PANEL_SETUP_BOARD_STACKUP: do not try to init params managed by PANEL_SETUP_BOARD_FINISH
From master branch
Fixes #15288
https://gitlab.com/kicad/code/kicad/-/issues/15288
2023-07-29 09:59:53 +02:00
jean-pierre charras 49772d2539 Gerber export X3: fix an incorrect keyword ("route" must be "rout") 2023-07-27 20:18:16 +02:00
Seth Hillbrand 2451cbddec Consolidate Maximum clearance calculation
We were calculating the same thing in three locations and we missed
adding the clearance from the footprints in, resulting in bad fills and
missed drc errors (see QA addition)

(cherry picked from commit 96a34e5b57)
2023-07-26 13:16:32 -07:00
Seth Hillbrand 2652068933 When routing, check for board-level clearances
If the board-level clearance exceeds the max pad/track clearance, we end
up missing collisions in the router.

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

(cherry picked from commit 000998ccae)
2023-07-24 15:19:59 -07:00
Jeff Young bac1fb18f0 Add DRCEpsilon to net-tie-exclusion testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14008

(cherry picked from commit d9a77e6a64)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15231
2023-07-20 12:45:38 -07:00
Seth Hillbrand e4a80d887a Refill legacy zone fills on open
Previous check only looked for the existence of a new (as of v6) flag
that controlled which strategy we took.  Previous versions did not write
this flag and so will not hit the check. This works around a missing
version bump from when the feature was introduced.

(cherry picked from commit 6a09cf3551)
2023-07-19 14:52:28 -07:00
Alex Shvartzkop 45d496bd01 Altium PCB: fix orientation of polygons and non-Cu pads in footprints.
Fixed in master by bbd6c80507
2023-07-20 01:14:34 +05:00
Jeff Young 7c0a911e9f Override FOOTPRINT::GetCenter() to ignore text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15209

(cherry picked from commit c2e7827774)
2023-07-16 20:06:23 +01:00
Jeff Young 62bf6a9d57 Save a bit of space in FP 3D preview by moving board thickness to dlg.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13896

(cherry picked from commit df63ca0189)
2023-07-16 20:01:26 +01:00
Jeff Young 4ad6244d8d Don't blindly cast to PCBNEW_SETTING: we may be in CVPCB....
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15153

(cherry picked from commit 5bf257cdf6)
2023-07-16 19:45:13 +01:00
jean-pierre charras f8210e4a2a Pcbnew, undo_redo: Do not cast to BOARD_ITEM items that are only EDA_ITEM
A BOARD_ITEM is derived from EDA_ITEM, so the cast is not possible
From Master branch
Fixes #15177
https://gitlab.com/kicad/code/kicad/-/issues/15177
2023-07-13 11:09:59 +02:00
Seth Hillbrand 1ccaf45740 Record hole knockouts in zone filler earlier
Spokes are placed across an entire pad when filling, so the hole
knockouts need to knocked out prior to deflating

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

(cherry picked from commit 3030c80de7)
2023-07-12 11:18:40 -07:00
jean-pierre charras d268ccea5b PCB_VIA::SetLayerSet( LSET aLayerSet ): fix bug: it must consider only copper layers.
Its purpose is to initialize the top and the bottom copper layers connected
by this via. So only copper layers in LSET must be analyzed.
From Master branch
2023-07-12 16:42:19 +02:00
jean-pierre charras 10efb6e55a PCB_TEXT::TransformTextToPolySet() fix a typo that can creates a *lot* of
segments in polygon.
Fixes #15161
https://gitlab.com/kicad/code/kicad/-/issues/15161
2023-07-11 13:12:47 +02:00
Jeff Young 17f02b2ff0 Disable positioning tools when a move is in progress.
Also fixes a typo in EDIT_TOOL::doMoveSelection().

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

(cherry picked from commit 7ed5963b4f)
2023-07-09 22:01:06 +01:00
Jeff Young 6316b78a5e Add SHORT_NET_NAME processing to footprint variable resolution.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15095

(cherry picked from commit def1a9f39c)
2023-07-09 21:56:22 +01:00
Jeff Young a43adf7d4f Allow routing to a free pad (even if it has a hole).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15093

(cherry picked from commit 6da71e5d24)
2023-07-09 21:55:21 +01:00
Jeff Young 16d24d4b43 Tailor inspector text properties for dimension objects.
(cherry picked from commit 50da4e483e)
2023-07-09 21:54:52 +01:00
Jeff Young 60fe2ce30e Save project to disk whenever we save the board to disk.
This prevents data loss in the event of a subsequent crash.

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

(cherry picked from commit 3bdc66d3ed)
2023-07-09 21:53:32 +01:00
Jeff Young b294530716 Prefer MRU path to LastImportExportPath for importing footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15102
2023-07-09 21:39:18 +01:00
Jeff Young b857374aa2 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

(cherry picked from commit 40abb013ec)
2023-07-09 21:08:52 +01:00
Jeff Young 480ce08d39 Clear arcs before deflating area outline.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15007

(cherry picked from commit 4473ebb02d)
2023-07-09 21:08:52 +01:00
Jeff Young 63f33a42e3 Don't trip over null strings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14989

(cherry picked from commit ecb2fcd559)
2023-07-09 21:08:51 +01:00
Jeff Young f6d1baa50a Refine track dangling test.
Turns out Clean Up Tracks and Vias wants a different answer from DRC.

(cherry picked from commit fb40c202a1)
2023-07-09 21:08:51 +01:00
Jeff Young 0df1ec8765 Track not dangling if entirely covered by pad.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14211

(cherry picked from commit 4e3730f653)
2023-07-09 21:08:51 +01:00
Jeff Young 76f8b3df22 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

(cherry picked from commit ef6866757e)
2023-07-09 21:08:51 +01:00
Alex Shvartzkop bbf59a731d EAGLE PCB import: fix footprint text alignment.
(cherry picked from commit a80ac8286d)
2023-07-09 05:46:12 +05:00
Alex Shvartzkop 803bcbbea0 Altium PCB import: fix text positioning when not bottom-left aligned.
(cherry picked from commit 536744d37a)
2023-07-09 05:46:12 +05:00
Seth Hillbrand cadea90109 Check for zone-zone overlap
Instead of just checking for the zone outline, we adjust to check the
full fill area of the zones for intersection and overlaps

(cherry picked from commit 954b265839)
2023-07-07 12:03:58 -07:00
Jeff Young 60696a895c Add DRC testing for copper graphic to zone fill collisions. 2023-06-30 11:56:40 +01:00
Seth Hillbrand 3926173dfe Fix zone fill issue with net ties
A mistake in the cherry-pick for a previous commit prevented footprint
graphics from being knocked out in the zone fill.  This sets the default
to knockout, allowing the assertion from the polygon generation routine
to catch invalid codes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15069
2023-06-27 12:35:42 -07:00
Tomasz Wlostowski 2f35d97b27 router: when no collision search context is provided, assume differentNetsOnly is true
(cherry picked from commit a0a68d198c)
2023-06-23 07:55:50 -04:00
Tomasz Wlostowski 152dc56df4 router: provisional fix for 14926
(cherry picked from commit bd5954242e)
2023-06-22 12:54:22 -04:00
jean-pierre charras f6f99e45b9 Pcbnew, graphic importer: convert arc with large radius to segment.
Arcs having a too large radius cannot be safely handled.
The criteria (not perfect) is radius < INT_MAX/2 to use arcs
Fixes #14210
https://gitlab.com/kicad/code/kicad/-/issues/14210
2023-06-19 10:46:30 +02: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 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