Commit Graph

1970 Commits

Author SHA1 Message Date
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
Jeff Young 0bce280424 Make sure design rules get recompiled after netclass changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/7082
2021-01-13 12:37:20 +00:00
Seth Hillbrand 6ed2a831d8 Don't override the router tool with drag actions
Before processing the select tool actions, we check if the router is
currently active and if it is, pass the event for processing in other
tools

Fixes https://gitlab.com/kicad/code/kicad/issues/7021
2021-01-12 15:44:20 -08:00
Michael Kavanagh 32f7f30958 Icons: remove where they don't make sense
Also avoid icon reuse
2021-01-11 23:31:25 +00:00
Michael Kavanagh 8fba0c257b Icons: remove more inconsistencies around Select
Missed from 5d9b2d3fea
2021-01-11 23:31:24 +00:00
Seth Hillbrand 740df93808 Don't dereference board groups in fp editor
The Footprint editor group resolution should stop at the footprint level
to avoid breaking into groups that cannot be accessed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7049
2021-01-11 14:58:33 -08:00
Jeff Young 50889a9ed6 Promote mouse drag settings to full enums. 2021-01-11 22:09:36 +00:00
Seth Hillbrand c09dc5abdd Prevent locking items in footprint editor
Adding footprints to the board now has a preference for whether we want
pads locked or unlocked by default
2021-01-11 11:23:26 -08:00
Jeff Young 6c648df4c6 Support 3 drag vs. select options, and unifiy with other drag prefs.
Fixes https://gitlab.com/kicad/code/kicad/issues/5493
2021-01-11 11:50:14 +00:00
Jeff Young 9ce6c2be80 Group global editors under tools menu.
Also improves some terminology in Remove Unused Pads.
2021-01-11 11:50:14 +00:00
Jeff Young ed7b3373d1 Disentangle copper- and board-edge-clearances in Clearance Resolution...
Fixes https://gitlab.com/kicad/code/kicad/issues/6983
2021-01-09 16:44:03 +00:00
Jeff Young 78dcfb2392 Honour locks inside groups.
Fixes https://gitlab.com/kicad/code/kicad/issues/6841
2021-01-09 13:47:24 +00:00
Seth Hillbrand cf2dd0bd38 Fix edit_tool pad handling
Check for footprint editor
Promote pad edits to footprint edits iff
 - Pad is locked
 - Footprint is not

Otherwise, handle the pad normally and prompt for locked items if found
2021-01-08 19:46:14 -08:00
Seth Hillbrand 1c9d8a9f4c Don't warn on locked conversion 2021-01-08 16:49:47 -08:00
Seth Hillbrand 51f02ecc51 Fix alignment tool with locked footprints 2021-01-08 13:58:26 -08:00
Seth Hillbrand 721155165d Don't move locked footprint if pads are locked 2021-01-08 13:58:26 -08:00
Jeff Young d0af4e9f9d Save a cancel value when asked if it's not being used to cancel.
Many, many KIDIALOGs use OK/Cancel and then rename both buttons to
confirm or deny some action.  In those cases we *do* want to store
the deny actions if they check "Do Not Show Again".

Fixes https://gitlab.com/kicad/code/kicad/issues/6979
2021-01-08 21:32:19 +00:00
Jeff Young 3467e643e5 Move pad locking from footprint to pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/6997
2021-01-08 20:43:02 +00:00
Seth Hillbrand 9424d66d22 Move footprint when selecting locked pad
Prompting to unlock is obtrusive and blocks the common action of
dragging from a pad to align footprints.  The less common action of
editing pads in layout can be accomplished after unlocking the pads

Fixes https://gitlab.com/kicad/code/kicad/issues/6997
2021-01-07 19:46:06 -08:00
Jon Evans 24435df6b0 Don't update 3D view on cursor movement
Our rendering pipeline is not set up for this kind of speed,
and this is a blocking operation at the moment.

Note that we will get an update at the end of the move
because OnModify does it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6819
2021-01-07 20:43:14 -05:00
Jeff Young 3fd128a75b Performance enhancements. 2021-01-08 00:46:55 +00:00
hoijui 6ca9a42251 Removes 3 other instances of a potential encoding problem
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2021-01-07 17:36:49 +00:00
Seth Hillbrand c0f940438a Clarify Flip action
Fixes https://gitlab.com/kicad/code/kicad/issues/6954
2021-01-06 13:02:44 -08:00
Jeff Young 2a088e5c7b Add conversion of circles to zones and enable in footprint editor.
Also rule areas, of course.

Fixes https://gitlab.com/kicad/code/kicad/issues/6966
2021-01-06 17:21:49 +00:00
Jeff Young 70967bfebd Hierarchical menu parents don't get ...'s.
Also moves the Convert menu up a level.  Nested hierarchical menus
should be avoided whenever possible.
2021-01-06 17:21:49 +00:00
Michael Kavanagh 6fd718fbd8 Icons: replace old with new 2021-01-06 00:35:20 +00:00
Michael Kavanagh 5d9b2d3fea Icons: new filter icon
+ remove icons where they don't make sense.
2021-01-06 00:35:20 +00:00
Michael Kavanagh 54724096ea Icons: consistency between Eeschema and Pcbnew 2021-01-06 00:35:20 +00:00
Seth Hillbrand 71a93c71f7 Prevent footprint editor snapping to footprint
Inside the footprint editor, we only want snap points from the base
elements

Fixes https://gitlab.com/kicad/code/kicad/issues/6948
2021-01-05 16:08:30 -08:00
Michael Kavanagh b40e3a39f5 Minor cleanup. 2021-01-04 23:59:36 +00:00
Michael Kavanagh 154e19b6e7 Icons: use common prefix for small 16x16 2021-01-02 23:16:33 +00:00
Michael Kavanagh 5a3f4f52df Icons: add new icon for Pcbnew 'Special Tools...' 2021-01-02 23:16:33 +00:00
Jeff Young 018c17399d SNR. 2021-01-01 23:17:49 +00:00