Commit Graph

2333 Commits

Author SHA1 Message Date
Seth Hillbrand 54f621c570 Use board polygon instead of bbox for size
Board BBox uses the visible size of the board, which includes edge cut
thickness.  This is not appropriate for the Board characteristics.
Using the outline polygon gives accurate results and falls back to a
bounding box in the case where the outline is invalid

Fixes https://gitlab.com/kicad/code/kicad/issues/10972
2022-02-25 11:13:01 -08:00
Jeff Young 5f1976f341 fixup! Better DRC checking when placing vias. 2022-02-25 10:40:05 +00:00
Jeff Young 5129143bcb Layer visibilities aren't stored in project for footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10953

(cherry picked from commit 5c54f40eae)
2022-02-25 10:40:05 +00:00
Jeff Young d7d31e4b76 Implement multi-layer stitching via logic.
(cherry picked from commit d65f9ad2d8)
2022-02-25 10:40:05 +00:00
Jeff Young b00f855c26 Better DRC checking when placing vias.
(cherry picked from commit 369f53bb19)
2022-02-25 10:40:05 +00:00
Jeff Young b24f51908b Fix nullptr error (no router tool in footprint editor).
(cherry picked from commit df3291c59d)
2022-02-20 16:57:54 +00:00
Jeff Young 246b6fcdd6 Use router to update message panel when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/10068
2022-02-20 13:54:01 +00:00
Jeff Young 02ec87b036 Cancel or commit pad edit mode when switching footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/10209

(cherry picked from commit 85805b95ba)
2022-02-20 01:03:08 +00:00
Jeff Young fd4ac7c5df Error messages for zone merging.
Also fixes a bug where zones meeting at a point would get merged
resulting in a self-intersecting zone.

Also fixes a bug where undo would not be handled correctly when zones
could not be merged.

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

(cherry picked from commit d5a2059c21)
2022-02-13 18:30:32 +00:00
Seth Hillbrand 8fc831cbc2 Validate arc output when editing
Handles checking output of the arc to ensure we don't end up generating
an invalid arc.  Also keeps the limit of the arc angle to be (360,360)
excluding 0.

Fixes https://gitlab.com/kicad/code/kicad/issues/10070
2022-02-06 17:18:04 -08:00
Marek Roszko b2c99dd953 Fix some leaking objects identified by PVS Studio V773
(cherry picked from commit a7ebfc31f9)
2022-02-05 18:30:24 +00:00
Jeff Young 471c0c4c1d More wide-string declarations. 2022-02-05 13:29:00 +00:00
Jeff Young 430c4862b6 Log an undo item when filling zones.
If we wanted to put it into the parent's undo item, then the *parent*
would need to not start a new undo record.  Not starting one in the
zone filler tries to add it to the *previous* change, not to the parent
change.

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

(cherry picked from commit 4cc1ced2f3)
2022-02-04 18:14:25 +00:00
Jeff Young 69b69aa431 Update text variables when they change.
Fixes https://gitlab.com/kicad/code/kicad/issues/10734
2022-02-04 00:34:20 +00:00
jean-pierre charras 42dfdf8c38 PCB_CONTROL::unfilledZoneCheck(): skip rule areas: they are not filled by definition.
Fixes #10691
https://gitlab.com/kicad/code/kicad/issues/10691
2022-01-31 17:04:05 +01:00
jean-pierre charras 60ae18893e PCB_POINT_EDITOR: fix missing init of PAD pos0 after changing
(From Master branch)
2022-01-22 10:43:23 +01:00
Roberto Fernandez Bautista b2ecf097ed Include Footprints within Groups when re annotating duplicates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10329

(cherry picked from commit de7158b80e)
2022-01-11 20:52:01 +00:00
Seth Hillbrand a74d1d9962 Keep ratsnest setting when pasting
Paste items should copy the global ratsnest visibility setting

Fixes https://gitlab.com/kicad/code/kicad/issues/10346
2022-01-10 12:48:03 -08:00
Seth Hillbrand 4d899d7820 Remove default hotkey for toggle zone display
It is too easy to accidentally hide your zones and the 'A' hotkey is
intuitively mapped to Add Footprint, to match Add Symbol in eeschema.

This won't change current hotkey customizations but will help prevent
future user error.  Users can still map the action to a hotkey if the
new toggle is useful to their workflow
2022-01-10 11:48:26 -08:00
Jon Evans f9d8ec6137 Handle footprint shapes in polygon creation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10259
2022-01-04 21:31:22 -05:00
Jon Evans e9b91b6fab Fix creating polygons from footprint rule areas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10257
2022-01-04 21:28:04 -05:00
Seth Hillbrand ed9a3deb57 Fix pad snapping in renumber pads
Snap shouldn't be looking for other items in this routine or using the
grid

Fixes https://gitlab.com/kicad/code/kicad/issues/10238
2022-01-03 17:18:03 -08:00
Seth Hillbrand bd75cffff3 Prevent ops on empty selection
Fixes https://gitlab.com/kicad/code/kicad/issues/10164
2022-01-01 15:28:47 -08:00
Jeff Young 1dc78c4adc Tidy up pad & parent footprint selection corner cases.
Fixes https://gitlab.com/kicad/code/kicad/issues/9923

(cherry picked from commit d9dba2edb2)
2021-12-23 17:01:19 +00:00
Jeff Young b6ff44cccf Fix failure to remove hover selection after rotate operation.
Fixes https://gitlab.com/kicad/code/kicad/issues/10058

(cherry picked from commit f696c4ddfc)
2021-12-23 17:01:06 +00:00
Mike Williams 956ac871c3 PCB Editor: changes to track width overrides starting track width
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
2021-12-15 23:32:48 +00: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
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
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
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
Seth Hillbrand 9884f40952 Update call signature for SwitchLayer
We don't use DC anymore
2021-12-09 10:14:11 -08: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 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
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 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
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
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
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
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
Seth Hillbrand 4b226b8172 Unify our breakTracks routines
Fixes https://gitlab.com/kicad/code/kicad/issues/9793
2021-11-27 06:34:47 -08:00
Jeff Young ba6ae4fa9b Kicad has many plugins. This one is for the pcb. 2021-11-25 12:56:46 +00:00
Seth Hillbrand f97c7c78c8 Connect ruler tool with axes preferences
Adds "UpdatePreferences" action that is called when the preferences are
updated, allowing running tools to act on changes that may affect them

Fixes https://gitlab.com/kicad/code/kicad/issues/9737
2021-11-23 12:52:21 -08:00
Jeff Young 8777ce3d4e TEMP_SELECTED is in m_flags, not m_status.
Fixes https://gitlab.com/kicad/code/kicad/issues/9610
2021-11-21 23:52:45 +00:00
Jeff Young cf1d5f5724 Teach selectConnectedTracks() about layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/9610
2021-11-21 13:53:43 +00:00
Jeff Young 229706b48a Formatting. 2021-11-21 13:53:43 +00:00
Seth Hillbrand 1d2fd6d271 Change persistent 45° state to only drawing
Move/edit points have a lossy state that holds only for the time in
which the tool is active.  It reverts back to non-constrained after
completion of the move/point edit

Fixes https://gitlab.com/kicad/code/kicad/issues/9574
2021-11-17 15:38:28 -08:00
Wayne Stambaugh 53f5d616aa Coverity issue fixes. 2021-11-13 11:38:31 -05:00