Commit Graph

12700 Commits

Author SHA1 Message Date
Seth Hillbrand 40d44c94cd Fix single-threaded loads/connectivity
We cannot set thread counts to hardware_concurrency()-1 without
considering that single core machines will get a thread count of 0.
2021-12-14 17:18:46 -08:00
Tomasz Wlostowski 965ab42938 router: when dragging segments, don't snap to other segments on the same layer. Fixes drag flickering for short segments.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9720
2021-12-15 01:48:04 +01:00
Tomasz Wlostowski 2ae3a83b54 router: fix use-after-free crash in single trace shove routing when m_endItem's owning NODE is erased by the springback algorithm.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9994
2021-12-15 01:33:05 +01:00
Seth Hillbrand 401de24274 Recalculate ratsnest after zone fill
Push the mutex down into the ZONE::Fill() routine and set the
connectivity update to run after zone fills.  The connectivity update
cannot run while the mutex is locked for zone fills.

Fixes https://gitlab.com/kicad/code/kicad/issues/9993
2021-12-14 13:37:15 -08:00
Roberto Fernandez Bautista aa64b739eb Board stackup: Ensure that m_choiceCopperLayers is updated
Need to do a full synchronisation with the board to ensure that the
drop down and other UI elements are reset

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9991
2021-12-14 18:00:07 +00:00
Seth Hillbrand 78ff9a857a Jerry-rig HTML-format alpha parsing
On wx3.0, the HTML format #RRGGBBAA cannot handle the alpha channel.
Instead, we route this through a COLOR4D routine when we need to use
these colors

Fixes https://gitlab.com/kicad/code/kicad/issues/9963
2021-12-13 16:04:40 -08:00
Wayne Stambaugh 348c2bc612 Fix another wxUpdateUIEvent retrigger loop. 2021-12-13 18:43:30 -05:00
Wayne Stambaugh 755607b8f8 Fix a few wxUpdateUIEvent retrigger loops. 2021-12-13 15:46:13 -05:00
Jeff Young 4c565fd222 Top layers includes a whole bunch of layers...
... and the first isn't particularly meaningful.  Use GetActiveLayer
instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/9972
2021-12-13 18:23:18 +00:00
Simon Schaak 8e5f929724 Fix default reference text copy for new footprints 2021-12-13 14:42:14 +00:00
Jon Evans b291d6c810 Fix success conditions in DP placer
The placer can sometimes generate segments that are not quite parallel.
Use a different tolerance for ApproxParallel to account for this.

Also set a minimum score for placement judging so that any placement
that doesn't violate DRC can be placed.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9948
2021-12-12 13:05:38 -05:00
Jeff Young 88fc6d25a7 Correctly handle deleting multiple selections in some grids.
Fixes https://gitlab.com/kicad/code/kicad/issues/9952
2021-12-12 17:28:17 +00:00
Seth Hillbrand 779629ad33 Fix deadlock
Fixes https://gitlab.com/kicad/code/kicad/issues/9959
2021-12-12 07:20:03 -08:00
jean-pierre charras c360bbba20 Browse footprint libraries now remember window-size and position
(resolveCanvasType() saves the settings, so it must come after they are loaded)
Fixes #9935
https://gitlab.com/kicad/code/kicad/issues/9935
2021-12-12 09:02:15 +01:00
dsa-t f2639e2928 Reverse sort order for net id in inspector 2021-12-11 23:12:47 +00:00
Seth Hillbrand 758ce43d9c Lock Connectivity Data when resetting
When we reset m_connAlgo, we need to lock the data mutex otherwise,
yields to the system may sometimes issue calls back to invalid data
until m_connAlgo has finished rebuilding

Fixes https://gitlab.com/kicad/code/kicad/issues/9922
2021-12-11 15:11:10 -08:00
jean-pierre charras 6d0d4e0db9 Pcbnew, router tool: ensure switching layer by + or - works when starting routing.
Fixes #9936
https://gitlab.com/kicad/code/kicad/issues/9936
2021-12-11 09:54:03 +01:00
Jeff Young 84e0feeee6 LibTree selection should follow footprint after Save As.
Fixes https://gitlab.com/kicad/code/kicad/issues/9913
2021-12-10 00:45:21 +00:00
Jeff Young 4f60d7ac78 Don't use lib tree target if lib tree isn't shown.
Fixes https://gitlab.com/kicad/code/kicad/issues/9913
2021-12-10 00:34:22 +00:00
Jon Evans 62e6f542ed Init zone type when creating in convert tool
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9918
2021-12-09 18:20:30 -05:00
Jon Evans 196571d004 Fix edge case in re-enabling auto track width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9887
2021-12-09 18:07:05 -05:00
Seth Hillbrand 9884f40952 Update call signature for SwitchLayer
We don't use DC anymore
2021-12-09 10:14:11 -08:00
Seth Hillbrand 77fbb495f2 Highlight net during inline drag
Keep consistent UX between inline drag and drag started in the router
tool itself by highlighting the net being dragged

Fixes https://gitlab.com/kicad/code/kicad/issues/9919
2021-12-09 09:28:43 -08:00
jean-pierre charras f2d6251979 PCB_EDIT_FRAME: very minor fix: make the frame title translatable in stand alone mode 2021-12-09 14:39:27 +01:00
Jon Evans 48e95dcf7e Disable custom track/via width when re-enabling connected width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9887
2021-12-08 21:13:34 -05:00
Jon Evans a9168860e0 Reduce excessive epsilon in polygon search algo
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9903
2021-12-08 21:04:23 -05:00
Jon Evans 622d0fc896 Re-add code to refresh plugins at each frame load
Should now be safe

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9781
2021-12-08 20:48:35 -05:00
Jon Evans 587ee890d9 Move where flag is cleared to catch more cases
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9892
2021-12-08 20:46:53 -05:00
Jon Evans 44e01dcd0a Skip newly-added footprints in connectivity
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9892
2021-12-08 20:39:12 -05:00
Jeff Young e9847cf2bd Exclude vias from first 'U' step.
Fixes https://gitlab.com/kicad/code/kicad/issues/9902
2021-12-08 23:16:33 +00:00
Jeff Young 1f9e75f676 Pad with hole same size or larger than pad isn't flashed.
... even if it's marked as being on copper layers.

Also changes the default hole clearance to 0.25mm.

Fixes https://gitlab.com/kicad/code/kicad/issues/9901
2021-12-08 23:16:33 +00:00
Jeff Young df1e74d418 Clean up dead code from last commit. 2021-12-08 23:16:33 +00:00
Jeff Young 7ffd43a6f4 Regularize the promotion of pads to footprints in non-free-pad mode.
Also regularizes some of the other selection filtering options.

This also fixes an invalidated iterator (and subsequent segfault) in
the old code.

Fixes https://gitlab.com/kicad/code/kicad/issues/9896
2021-12-08 13:08:54 +00:00
Seth Hillbrand 1160bd94b0 Scale vertex lineweights in DXF import
DXF lineweights are always in 100th of mm, so scale the set weights on
import

Fixes https://gitlab.com/kicad/code/kicad/issues/9854
2021-12-07 16:23:44 -08:00
Jon Evans 63f67b7e5b Fix loading netclasses from legacy boards via Python 2021-12-07 18:55:08 -05:00
dsa-t 9c619d8f4e Allow some navigation tools when selecting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9565
2021-12-07 23:00:39 +00:00
dsa-t a7193e0932 Do not warp cursor to last location when footprint/text placement is activated from toolbar/menu.
Also makes the footprint appear instantly after closing the dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9840
2021-12-07 22:48:56 +00:00
Seth Hillbrand fbdb2bd91f Fix broken refactor from 0e65fe5
'auto' here was utilizing a copy constructor to avoid assigning a new
value to the underlying shared pointer
2021-12-07 12:38:05 -08:00
Seth Hillbrand c613f5e2f1 Convert DXF arcs in fp space
Once the arcs are set in pcbnew, they have integer representation and
can accumulate rounding errors.  So we convert the start/end points in
the importer to ensure that the connected points in a DXF remain
connected

Fixes https://gitlab.com/kicad/code/kicad/issues/9827
2021-12-07 10:53:35 -08:00
Seth Hillbrand 84cdc9701f Partially reverts d877f041
Based on discussion in https://gitlab.com/kicad/code/kicad/-/merge_requests/1029
we will keep the original behavior.  The new routines to get stock paths
are still useful (possibly in scripting) and are kept
2021-12-06 16:14:40 -08:00
Jeff Young 73b39e836d Set modify bit when editing page layout.
Fixes https://gitlab.com/kicad/code/kicad/issues/9891
2021-12-06 23:08:33 +00:00
Jeff Young 2446844cd3 Fix bugs in free-pad logic.
Don't promote pads to parent footprint selection when NOT in free
pad mode during move.

Implement move algorithm in rotate.

Fixes https://gitlab.com/kicad/code/kicad/issues/9893
2021-12-06 22:53:45 +00:00
Konstantin Baranovskiy d00810c0fb Pcbnew: make search field focused by default in Find dialog 2021-12-06 19:08:23 +00:00
Jonathan Haas 04b0435c45 Snap to pads when placing via
Fixes https://gitlab.com/kicad/code/kicad/issues/9873
2021-12-06 15:54:49 +00:00
Jeff Young 95087c6de5 Fix clearance outlines for router head.
Fixes https://gitlab.com/kicad/code/kicad/issues/9885
2021-12-06 15:51:53 +00:00
Roberto Fernandez Bautista 34a0d1947a pcbnew Flip: Filter selection for free pads, select footprint instead
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9875
2021-12-06 14:34:26 +00:00
Mikolaj Wielgus 18ba6b4de8 Fix PCB_TEXT hit test, take two
Fixes https://gitlab.com/kicad/code/kicad/issues/9866
2021-12-06 01:05:37 +01:00
Mikolaj Wielgus d0e9d4868c Fix PCB_TEXT hit test when bounding box is rotated
Fixes https://gitlab.com/kicad/code/kicad/issues/9866
2021-12-06 00:52:07 +01:00
Jon Evans 014bad7b28 Add profile counters for PCB mouse and paint events 2021-12-05 15:16:08 -05:00
Jon Evans 5ba215c8ea Use actual width when previewing PNS lines 2021-12-05 13:41:39 -05:00