Commit Graph

2002 Commits

Author SHA1 Message Date
Jeff Young 6272b48481 Make sure layer gets passed in to rules evaluation. 2021-02-08 14:53:49 +00:00
Jeff Young 0ca76571ce Add footprint zones to paste routine.
Fixes https://gitlab.com/kicad/code/kicad/issues/7442
2021-02-07 11:50:59 +00:00
Jeff Young c2dbd28101 Simplify and harmonize symbol editor and footprint editor menus.
Some differences are due to difference between libraries being files
in symbol editor and directories in footprint editor, but this unifies
most of the rest.

It also dispenses with the save-to-library vs save-to-document distinction
in the GUI because it makes for too much variability in the GUI, was
implemented differently between the two editors, and isn't needed as much
anymore now that we have the highly visible infobar.

There was also an issue that the save-to-board icon occupies the same
location and has the same size/shape/colours as the Board Setup icon in
PCBNew.

Fixes https://gitlab.com/kicad/code/kicad/issues/7215
2021-02-06 14:33:16 +00:00
Jeff Young 49a09f4c1c Pad selectability fix.
Physical layer test needs to be board-visible-layers, not pad-layers.

Also cleans up the tests so that LOD factors in.  (When things
disappear due to zoom level they should not be selectable.)

Fixes https://gitlab.com/kicad/code/kicad/issues/7238
2021-02-06 13:57:40 +00:00
Jeff Young 065a16b48c Careful that we don't move the wrong end of the arc.
Fixes https://gitlab.com/kicad/code/kicad/issues/7409
2021-02-03 23:53:11 +00:00
Jeff Young 90519c8324 Allow pads with holes to be selected when hole is visible. 2021-02-02 14:23:29 +00:00
Jeff Young 8571687f51 Upgrade place via tool to new DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/7358
2021-02-01 23:00:13 +00:00
Seth Hillbrand 29632e8b6f Include footprint center as snap point
Only when footprint center isn't approximate the footprint origin as
well.  This can help when moving/aligning THT footprints

Fixes https://gitlab.com/kicad/code/kicad/issues/7385
2021-02-01 12:03:26 -08:00
Jeff Young 89d3b0b670 Remove breakage of corner pinning in point editor.
For some reason the post-pinned local variable references were replaced
with calls to the points themselves (which are the pre-pinned values).

Fixes https://gitlab.com/kicad/code/kicad/issues/7291
2021-02-01 00:35:45 +00:00
Jon Evans abf0a46dce Refactor PICKER_TOOL and push up snapping disable functionality
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7348
2021-01-31 09:50:41 -05:00
Jeff Young a868fb97b6 Preserve Uuids when editing board footprints.
One way to do this would have been to keep the Uuids in the editor
copy.  However, this opens us up to errors if we forget a Save As or
export path and end up writing the Uuids out somewhere else.

In the end, it felt safer to store a map of the original Uuids and
restore them if we happen to save the editor footprint back to the
board.

Fixes https://gitlab.com/kicad/code/kicad/issues/7312
2021-01-31 14:09:59 +00:00
Jeff Young 56ea55ae9c Make sure that NPTH pads still get handled in copper clearance checker.
... because that's where we do hole-to-copper clearance testing.

Also augments the Clearance Resolution reporter to report on said
hole clearances.

And changes the interpretation of HOLE_CLEARANCE_CONSTRAINT to include
local pad clearance overrides.

Fixes https://gitlab.com/kicad/code/kicad/issues/7325
2021-01-31 00:33:35 +00:00
Jeff Young 41234a8373 Implement more precise annotation-required messages.
Also moves the message to an infobar so it's more noticeable.

Fixes https://gitlab.com/kicad/code/kicad/issues/7332
2021-01-30 16:31:27 +00:00
Seth Hillbrand 386ead30c5 All circle and arc tools to select all at first
Non-layer elements can be logical centers for the circle and arc tools.
We allow the non-layer to snap for the center points and revert to only
on-layer elements after

Fixes https://gitlab.com/kicad/code/kicad/issues/7327
2021-01-29 10:14:44 -08:00
Jon Evans b5e9a949bc Selection: skip sloppiness pruning if invalid
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7320
2021-01-28 19:51:29 -05:00
Jeff Young 1a7b7e84c6 Use consistent terminology for component placement files.
CHANGED footprint positions files -> component placement files.

Not all footprints get placed, so component is a more neutral word.
Use of "placement" instead of "positions" removes the double-plural
that makes footprint positions files such a mouth-full.

Fixes https://gitlab.com/kicad/code/kicad/issues/7097
2021-01-28 19:24:55 +00:00
Wayne Stambaugh 6a39b81647 Fix the last of broken Doxygen comment specifiers. 2021-01-27 17:39:44 -05:00
Mikołaj Wielgus 3e42ba18a9 Show dragging tools in context selection menu for components
Show the dragging tools in the context selection menu when a single
component is selected. Prevent the dragging tools from appearing when
more than one object is selected, as they will not activate anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/7258
2021-01-27 19:55:42 +00:00
Jon Evans 79f94c096e Rename legacy selection filter action to avoid confusion
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7290
2021-01-26 18:15:36 -05:00
Jeff Young dca7e44455 Fix a missed Module -> Footprint. 2021-01-26 10:56:19 +00:00
Michael Kavanagh d933a0a863 Use the pencil for Properties in Pcbnew 2021-01-25 14:21:23 +00:00
Michael Kavanagh eba09a59e9 Remove inappropriate icon 2021-01-25 14:21:22 +00:00
Jeff Young d40fe127aa Update pad locked status when adding footprints from schematic.
Also fixes some latent bugs with not updating the local ratsnest
visibility in other places, and the netcode in update PCB from schematic.

Fixes https://gitlab.com/kicad/code/kicad/issues/7202
2021-01-25 01:20:36 +00:00
Seth Hillbrand 47d5900600 Fix build warnings 2021-01-24 11:37:48 -08:00
Mikolaj Wielgus 04cc64c008 Restore the old reference after rotation or flip instead of clearing
After a rotation or flip the reference point has to be restored to the
previous value to prevent the dragged item from warping to the cursor.
Before this change, the reference point was only cleared, causing odd
behavior when a rotation or flip was performed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7112
2021-01-24 18:56:46 +00:00
Roberto Fernandez Bautista f353fc448b Fix edge cases in EDIT_TOOL::DragArcTrack 2021-01-24 16:41:11 +00:00
Roberto Fernandez Bautista 99d203feae Clarify CIRCLE::ConstructFromTanTanPt
Remove unused bool aAlternateSolution and add doxygen comments
2021-01-24 16:41:11 +00:00
Roberto Fernandez Bautista 48823c0723 Formatting fixes and fix qa_kimath following rebase 2021-01-24 16:41:10 +00:00
Roberto Fernandez Bautista 6e7ae93cc8 EDIT_TOOL::DragArcTrack Fix incorrect undo history when items are deleted
Need to make sure we only apply one COMMIT operation per object before calling COMMIT::Push() or COMMIT::Revert()
2021-01-24 16:41:10 +00:00
Roberto Fernandez Bautista 2b5c1bae97 CHANGED: Dragging a curved track starts an interactive resizing of it, keeping start an end points tangent 2021-01-24 16:41:10 +00:00
Jeff Young 0ded846130 Go back to previous arc midpoint editing routine.
It avoids erratic behaviour near the chord or end-points.

Fixes https://gitlab.com/kicad/code/kicad/issues/7135
2021-01-19 23:50:40 +00:00
Michael Kavanagh 80dbc24326 Icons: remove superfluous icon
Remove icons where menu text gives context
2021-01-19 22:57:25 +00:00
Jeff Young 35978adef9 Don't run dimension updates while parsing files.
They mess up the geometry when only partial values are provided.

Fixes https://gitlab.com/kicad/code/kicad/issues/7177
2021-01-19 16:09:44 +00:00
Jeff Young 0a2a3c9903 Fix Coverity-discovered typo. 2021-01-19 10:57:07 +00:00
Michael Kavanagh 7461b96dea Hide the selection tool submenu in the FP Editor
Fixes https://gitlab.com/kicad/code/kicad/issues/7164
2021-01-19 00:30:44 +00:00
Jeff Young 12fe44d4b3 Snap arc center *by* the grid, not *to* the grid.
Also fixes a bug with editing an arc endpoint because the cursor pos
was being forced before the arc constraints stuff had been run (in
updateItem()).
2021-01-19 00:26:31 +00:00
Seth Hillbrand b8dfcb34c4 Revert "Use less-sophisticated arc editing math."
This reverts commit 3b424d3868.  And fixes
issue with rouding causing arc errors
2021-01-18 12:44:27 -08:00
Jon Evans 1e33928b96 Fix issues with zone filling connectivity locking
Two issues found with the locking system used to prevent access to
stale connectivity data during the zone fill process:

1) a std::mutex has undefined behavior if you try to use it to guard
against access from the same thread.  Because of the use of wx event
loops (and coroutines) it is entirely possible, and in some situations
inevitable, that the same thread will try to redraw the ratsnest in the
middle of zone refilling.

2) The mutex was only guarding the ZONE_FILLER::Fill method, but the callers
of that method also do connectivity updates as part of the COMMIT::Push.
Redrawing the ratsnest after the Fill but before the Push will result in
stale connectivity pointers to zone filled areas.

Fixed (1) by switching to a trivial spinlock implementation.  Spinlocks would
generally not be desirable if the contention for the connectivity data crossed
thread boundaries, but at the moment I believe it's guaranteed that the reads
and writes to connectivity that are guarded by this lock happen from the main
UI thread.  The writes are also quite rare compared to reads, and reads are
generally fast, so I'm not really worried about the UI thread spinning for any
real amount of time.

Fixed (2) by moving the locking location up to the call sites of
ZONE_FILLER::Fill.

This issue was quite difficult to reproduce, but I found a fairly reliable way:
It only happens (for me) on Windows, MSYS2 build, with wxWidgets 3.0
It also only happens if I restrict PcbNew to use 2 CPU cores.
With those conditions, I can reproduce the issue described in #6471 by
repeatedly editing a zone properties and changing its net.  The crash is
especially easy to trigger if you press some keys (such as 'e' for edit)
while the progress dialog is displayed.  It's easiest to do this in a debug
build as the slower KiCad is running, the bigger the window is to trigger this
bug.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6471
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7048
2021-01-18 13:22:12 -05:00
Michael Kavanagh 479487ceb1 Tidy up context menus a bit
Try and put the common actions in the same places
2021-01-17 22:42:03 +00:00
Jon Evans 6bb9aeab4b Position relative: store discarded pad for use as the selection anchor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6996
2021-01-17 14:25:52 -05:00
Jeff Young 68efdb2fff Push shared parts of GRID_HELPERs into common. 2021-01-16 23:18:10 +00:00
Jeff Young 3b424d3868 Use less-sophisticated arc editing math.
While it doesn't do the tangent retention that the old version did,
this one I can at least make work.

Fixes https://gitlab.com/kicad/code/kicad/issues/7135
2021-01-16 20:46:14 +00:00
Roberto Fernandez Bautista 00918c68f5 Don't do clever snapping logic when drawing a circle
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7131
2021-01-16 08:39:20 +00:00
Jon Evans 38455c25ef Bring back consideration of world scale to PcbNew snapping
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7125
2021-01-15 12:29:47 -05:00
Jon Evans 6cc39d8011 Don't allow moving locked pads with Position Relative dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6996
2021-01-14 22:14:00 -05:00
Jeff Young 36508807e7 Give the pad placement tool a context menu.
ADDED: allow pad properties to be edited while placing pads.

Fixes https://gitlab.com/kicad/code/kicad/issues/6953
2021-01-15 00:52:03 +00:00
Mikolaj Wielgus 0129c7ae52 Notify appearance panel when net is (un)hidden by board inspection tool
Fixes https://gitlab.com/kicad/code/kicad/issues/7039
2021-01-14 17:22:41 +00:00
Jeff Young 3e920c665f Special case via area generation.
Fixes https://gitlab.com/kicad/code/kicad/issues/7105
2021-01-14 12:48:44 +00:00
Seth Hillbrand 13a4717aed Add center handles to rectangle edits
Allows changing a single dimension at a time.  Matching the polygon edit
tool.

Fixes https://gitlab.com/kicad/code/kicad/issues/7085
2021-01-13 14:04:21 -08:00
Jeff Young ffdff21f45 Use a sloppier hittest for the collector as well as the actual hittest.
Fixes https://gitlab.com/kicad/code/kicad/issues/7079
2021-01-13 21:22:24 +00:00