Commit Graph

2164 Commits

Author SHA1 Message Date
Jon Evans 34c2bbfe51 Don't rebuild the whole nets grid on show/hide
Besides being slow, this causes the scroll position
of the grid to be lost.
2021-02-16 22:31:09 -05:00
Jeff Young 2a7e60960a Use standard mirror icons & terminology.
Also use standard group icons.

Also put both (and rotate commands) in toolbar.

Fixes https://gitlab.com/kicad/code/kicad/issues/7504
2021-02-16 21:11:36 +00:00
James Jackson dd7030a28f Keepout and graphic selection filters in footprint editor behave as per PCB editor
Fixes #7547

Fixes https://gitlab.com/kicad/code/kicad/issues/7545
2021-02-16 20:49:14 +00:00
Jeff Young cf42d692bf Remove some dead code. A little bit of comment cleanup as well. 2021-02-15 14:13:43 +00:00
Jeff Young b7672d3c92 Respece router Allow DRC Violations in free via placer.
Also don't check for collision on non-copper layers, but do check
for hole clearance violations.

Fixes https://gitlab.com/kicad/code/kicad/issues/7532
2021-02-14 22:32:12 +00:00
Mikolaj Wielgus 379c28340f Pcbnew: Do not disable grid snap in copy to clipboard operation
This simple commit makes the Pcbnew copy to clipboard operation snap the
obtained cursor position to grid before the anchors are calculated. This
is also the way the move operation has been apparently working so far.

To be clear, this will not remove all cases where the copy reference
point is not aligned to the grid (see the linked Gitlab issue for
details about the problem). This will still occur for zone outlines that
are not axis-aligned. But such behavior has been so far also present in
the moving operation, so this may be as designed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7507
2021-02-14 01:44:28 +00:00
Jon Evans b708fd36ae Add tooltips to netclass setup panel column headers
Change router tooltips to be more straightforward
2021-02-11 20:50:26 -05:00
Mikolaj Wielgus 1dc0ef01b3 Fix automatic wire tool in gridless mode
The automatic wire tool was not working in the gridless mode because the
grid snapping on/off logic present in `EE_GRID_HELPER`, based on the
value of `m_enableGrid`, was not taking into account that another check,
but for the global KiCad setting, would be performed in the `Align()`
method, which is inherited from `GRID_HELPER`.

I've modified all tests of `m_enableGrid` value to also take the global
setting into account, and moved checks for it to `Align()` method, as
it's more consistent this way.

I've also removed an override of the `Align()` method in the
`PCB_GRID_HELPER` class, as it was made redundant by my changes.

Fixes https://gitlab.com/kicad/code/kicad/issues/7402
2021-02-10 22:07:49 +00:00
Jeff Young 20338c92e8 Move Flip board view to a shared tool (for FP Editor).
Fixes https://gitlab.com/kicad/code/kicad/issues/6687
2021-02-10 17:06:19 +00:00
Jeff Young a49a6c2f52 Refresh zone layers when copper layers change opacity.
Fixes https://gitlab.com/kicad/code/kicad/issues/7468
2021-02-09 12:26:46 +00:00
Jeff Young e2f8b1a4b1 Interpreting wxDialog::ShowModal()'s retval as bool is never what you want.
Fixes https://gitlab.com/kicad/code/kicad/issues/7454
2021-02-08 17:40:57 +00:00
Mikolaj Wielgus 5aaedd86ed Add "Limit graphic lines to 45 deg" to line drawing tool context menu
Fixes https://gitlab.com/kicad/code/kicad/issues/7181
2021-02-08 16:20:38 +00:00
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
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
Jeff Young 8ee72853fb Be more targetted on when we load DRC Rules for better performance. 2021-01-01 23:17:49 +00:00
Seth Hillbrand a69a4be853 Fix build error with icon names 2021-01-01 13:13:33 -08:00
Seth Hillbrand 72c27b2e33 Make expand selection stop at vias
During the first expansion, we are supposed to stop at vias and branches
(where three track ends connect).  This needs to account for the number
of vias and tracks not just tracks
2021-01-01 09:31:44 -08:00
Seth Hillbrand 5a3e5781bf Allow polygon drawing on edge cuts and courtyard
Prevents line splitting behavior needed in v5 when drawing polygons on
courtyards. Also provide property dialog with some smarts to handle
special layers

Fixes https://gitlab.com/kicad/code/kicad/issues/6900
2020-12-30 14:10:30 -08:00
PJM 94bf88d820 Pcbnew: Prevent selections jumping when dragged after flip or rotate
CHANGED: If you flip or rotate an item or selection of items, move
the mouse, press 'M' and start moving the mouse, the selection jumps
to where the mouse is.  This MR fixes that so it doesn't happen.

This bug was reported against the 5.1.x branch but also affects the
5.99 branch.  This MR is for the 5.99 branch.

Fixes https://gitlab.com/kicad/code/kicad/issues/4069
2020-12-30 01:02:04 +00:00
Jeff Young 35a5781f68 Don't look at project layer visibilities for footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/6873
2020-12-29 17:03:43 +00:00
Jeff Young efd16dca66 Fix a bunch of issues with group selection and highlighting.
Fixes https://gitlab.com/kicad/code/kicad/issues/6686
2020-12-29 12:41:24 +00:00
Jeff Young f7a6dc26e9 Give GROUP_PROPERTIES_DIALOG its own files. 2020-12-29 12:41:24 +00:00
Jon Evans 55394f343d Don't use snapping for a selection interaction
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6856
2020-12-28 17:26:39 -05:00
Jeff Young 10e51bfea7 Don't apply "normal" locking strategy to alignment options.
It's much more useful to use the locked items as targets.

Also fixes some issues with commits getting the wrong items when
pads are promoted to footprints.

Fixes https://gitlab.com/kicad/code/kicad/issues/6859
2020-12-27 15:02:25 +00:00
Jeff Young e3d95cc2c8 Formatting. 2020-12-27 15:02:25 +00:00
Jeff Young 7a081b7c04 Naming consistency. 2020-12-25 16:59:41 +00:00
Jon Evans a9ff98bccc Allow selecting locked pads at all times
Locked pads are a bit different from other locked items
and there are sufficient reasons to need to select them
that it makes sense to introduce this inconsistency.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6837
2020-12-24 14:35:44 -05:00
Jeff Young 5fffde09d4 Improve SNR and formatting. 2020-12-24 10:36:29 +00:00
Michael Kavanagh 6489781408 Icons: use correct icons for show/hide ratsnest
- Remove old icon remnants
 - Recolour show/hide_ratsnest to match KiCad style
2020-12-24 01:02:02 +00:00
Jeff Young ffe7d2ea49 Only draw group boxes when selected.
Also ignore footprint groups when in board editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/6826
2020-12-23 21:43:32 +00:00
PJM 32f1e79c28 Pcbnew: Fix ctrl-MMB double click to perform 'Zoom to Objects'
CHANGED: Ctrl-middle mouse button double click should perform
'Zoom to Objects' in Pcbnew, but a change in modifier key handling
broke it.  This MR restores the functionality.

Fixes https://gitlab.com/kicad/code/kicad/issues/6740
2020-12-20 23:20:09 +00:00
Jon Evans 70c397a9b4 Implement free vias fully
CHANGED: manually-placed (stitching) vias won't have their nets automatically updated
(unless the via is placed directly on a track segment)

CHANGED: stitching vias can be placed on footprint pads and pick up their nets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5484
2020-12-20 16:29:50 -05:00
Wayne Stambaugh f311831c27 Coverity fixes.
280252, 314742, 314745, 314747, 314755, 314756, 314757, 314758,
314935, 314936
2020-12-20 13:24:47 -05:00
Jon Evans dc1c80beb8 Allow highlighting from locked items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6758
2020-12-20 11:24:19 -05:00
Jon Evans a6e595dbda Don't start dragging unselected zones from their filled areas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6795
2020-12-20 10:41:02 -05:00
Jeff Young d9bbdffd99 Don't offer point-based pad editing in PCBNew. 2020-12-19 19:51:51 +00:00
Jeff Young e840e9d997 Use themeable colours for snap helpers.
Fixes https://gitlab.com/kicad/code/kicad/issues/6664
2020-12-19 19:51:51 +00:00
Marek Roszko 9b0a137d6c Stop bludgeoncompiling dialog_page_settings
Through the power of OOP!
Needs some more cleanup though
2020-12-19 10:40:37 -05:00
Wayne Stambaugh 08cf9a1e20 Move headers from common folders to appropriate include folders round 1. 2020-12-17 08:12:18 -05:00
Ian McInerney fc20eaa083 Fix some compiler and Coverity warnings 2020-12-17 00:30:22 +00:00
Jeff Young acfbcb4beb Make distinction between PCBNew-wide tools and Board-specific tools.
The old names were really hard to keep straight (even for me, who named
many of them).
2020-12-16 13:32:46 +00:00
Seth Hillbrand b7875e4d41 Setup file_* icons
Don't use the same "post_*" icon in the treeview.  The badge gives an
action that doesn't apply in the treeview.

Also renames different file blobs to the "file_*" prefix.
2020-12-15 14:48:09 -08:00
Jeff Young 5f9ed2583c Don't put up double lock confirmation dialogs.
Also removes EditToolSelectionFilter which was misused in more places
than it was used correctly.  The original point of the client filter
was to move the logic to the point of use, which the
EditToolSelectionFilter sort of obviated anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/6751
2020-12-15 22:34:24 +00:00
Seth Hillbrand dad2e317e9 Modify edit text & graphics to use pencil 2020-12-14 17:03:35 -08:00
Jeff Young 4faa4931ae Fix missing gerber icon.
Fixes https://gitlab.com/kicad/code/kicad/issues/6727
2020-12-15 00:15:03 +00:00
Jeff Young 22a6b36257 Don't allow dbl-click to leak through to other tools.
This only applies if the tool doesn't handle properties (which also
handles double-click events).

Fixes https://gitlab.com/kicad/code/kicad/issues/6735
2020-12-14 22:15:43 +00:00
Seth Hillbrand 2bf0eb1e3a Add convert icon 2020-12-12 11:14:58 -08:00
Michael Kavanagh dce4d04113 Add 24x24 size refresh icon
Previously 16x16 was being used alongside 24x24
2020-12-12 18:51:55 +00:00
Michael Kavanagh cf6f0b9b92 Use trash icon where appropriate 2020-12-11 17:05:11 -08:00
Wayne Stambaugh dd4298bb94 Coverity fixes: 280374, 313611, 313648, 313649, and 314720. 2020-12-11 13:29:52 -05:00
Jeff Young 6898dadd1c Don't activate measure tool when it's already running.
In this case it's reactivated when the move command ends; only the
move command was ended because of activating the measure tool so it
gets activated twice.

Fixes https://gitlab.com/kicad/code/kicad/issues/6321
2020-12-10 22:14:52 +00:00
Jeff Young 98330098ac Yet another overhaul to locking.
This unifies everything under a single architecture with a "don't
show again" dialog.  Since everything now goes through the same
path it should be reasonably easy to make it do whatever we want
in the future.

Right now it presents 3 options: modify only unlocked items, override
locks and modify all items, or cancel command.
2020-12-10 17:36:19 +00:00
Jeff Young 9113f93ebe Uniformly apply current locking strategy.
I make no claims that this is the right strategy, but at least it's
consistent now.

Fixes https://gitlab.com/kicad/code/kicad/issues/6369
2020-12-10 01:34:37 +00:00
Jeff Young 90d58c8509 Fix typo. (Thanks Graham!) 2020-12-10 00:08:05 +00:00
Jeff Young c6b17a0175 Enable lock menu for all selections.
It doesn't pay to try and be too smart as it just confuses people.
When the bugs come in that it doesn't dim I'll just be marking them
as "as designed". :)

Fixes https://gitlab.com/kicad/code/kicad/issues/6367
2020-12-09 22:19:06 +00:00
Jeff Young df4f4560be Change lock toggle to put selection in uniform state.
Fixes https://gitlab.com/kicad/code/kicad/issues/6367
2020-12-09 22:19:06 +00:00
Jeff Young 65782d5c5a Move delete-again-to-delete-locked-objects to hypertext in infobar.
Fixes https://gitlab.com/kicad/code/kicad/issues/6367
2020-12-09 22:19:06 +00:00
Jeff Young 431c8dba3c Adjust undo when deleting members of a group.
Fixes https://gitlab.com/kicad/code/kicad/issues/6678
2020-12-09 00:18:36 +00:00
Jeff Young 5e9d9f5753 Special handling for presence of Ref or Value in groups.
Fixes https://gitlab.com/kicad/code/kicad/issues/6677
2020-12-09 00:18:36 +00:00
Seth Hillbrand 799e1efba2 Update group icons 2020-12-08 12:22:18 -08:00
jean-pierre charras 9c4eef2cef Fix a missing view update when loading a footprint from the fp viewer.
For some reason, a footprint loaded from the fp viewer did not have its
view parameters fully updated (view bounding box not moved to the right place).
The fix ensure these parameters are updated.
2020-12-08 17:52:30 +01:00
Jeff Young 60ecd4698c Nets don't have properites; netclasses do. 2020-12-08 13:05:39 +00:00
Jeff Young 2260597236 Fix more accidental event capturing.
Fixes https://gitlab.com/kicad/code/kicad/issues/5844
2020-12-06 13:33:23 +00:00
jean-pierre charras 16c92f4134 Fp editor: Add a tool tip in the vertical toolbar 2020-12-06 13:35:21 +01:00
Jeff Young de082e9be7 Make footprints mostly covered in pads easier to select.
If all the uncovered space is at the very edge it doesn't feel like
there's anywhere to click but the disambiguation menu doesn't come
up.

Fixes https://gitlab.com/kicad/code/kicad/issues/6584
2020-12-05 23:02:45 +00:00
Jeff Young d6c3c6f7fa Use footprintRect not ViewBBox for determining footprint bounds. 2020-12-05 19:44:02 +00:00
Seth Hillbrand 3704c1cdb7 New icons for v6
Fixes https://gitlab.com/kicad/code/kicad/issues/2542
2020-12-05 11:17:15 -08:00
Jeff Young 4e100b8d03 Handle groups in clearance report, and make sure zone bboxes are cached.
Fixes https://gitlab.com/kicad/code/kicad/issues/6571
2020-12-04 20:49:14 +00:00
Jeff Young fd5e1fbdd4 Formatting and cleanup. 2020-12-04 14:01:54 +00:00
jean-pierre charras 2f3ca60c5e Pcbnew, modifiers for left click behavior: re-add highlight net option.
Due to last changes fixing the ALT key problems, the highlight net is
CTRL+SHIFT + left click on Windows and Linux
CTRL+ALT + left click on OSX

Fixes #6595
https://gitlab.com/kicad/code/kicad/issues/6595
2020-12-04 10:25:05 +01:00
Jeff Young 09bfb76545 Make sure dissallow constraints get added to rule.
Also improves some error reporting.

Fixes https://gitlab.com/kicad/code/kicad/issues/6566
2020-12-03 23:08:51 +00:00
Jeff Young e882753ebf Grid snapping fixes.
1) Uniformly honour the GAL grid snap settings
2) Make more uniform use of GRID_HELPERs
3) Smarten EDIT_LINE for mid-point snapping

Fixes https://gitlab.com/kicad/code/kicad/issues/6558
2020-12-03 19:55:58 +00:00
Jeff Young 43fe228367 Hook up a bit more of the EE_GRID_HELPER.
Fixes https://gitlab.com/kicad/code/kicad/issues/5985
2020-12-02 23:18:33 +00:00
Jeff Young 96c9680922 Separate width adjustments between single track and diff pair.
Fixes https://gitlab.com/kicad/code/kicad/issues/6572
2020-12-02 16:24:33 +00:00
Jeff Young 1cd8426bcb Fix latent dyn_cast bug. And a bunch of formatting issues. 2020-12-02 00:29:00 +00:00
Jeff Young f70153b849 Implement Group Properties in Footprint Editor.
Also fixes a pair of typos that were keeping delete of a group in the
Footprint Editor from working.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/6578
2020-12-01 23:43:53 +00:00
Jeff Young df262eaa06 Make prev/next marker work reliably on all platforms.
Requires us to move from arrow-keys to our own commands (the only
way that the OSX wxWidgets impl doesn't eat the keys when the dataVIew
has focus).

While there we might as well add a command to exlucde markers.

ADDED Prev Marker, Next Marker, Exclude Marker

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

Fixes https://gitlab.com/kicad/code/kicad/issues/5501
2020-12-01 22:37:07 +00:00
Jeff Young 3c521942ed Smarten isEmpty checks to include nothing-but-whitespace.
Fixes https://gitlab.com/kicad/code/kicad/issues/6567
2020-12-01 16:39:06 +00:00
Jeff Young d50d1d84da Fix some issue with group in selection logic. 2020-12-01 14:04:01 +00:00
Jeff Young 3a9a6e22bc Fix issues in reporting netclasses.
1) make sure we get the default netclass when we want it
2) escape for HTML (particularly important for "<invalid>", but also
for reporting user rule names, netclass names, etc.)
2020-11-30 14:38:06 +00:00
Wayne Stambaugh 1f8b7b6149 Pcbnew: change block selection and heuristic context menu modifier keys.
Do not use the alt modifier key to force the display of the heuristic
context menu.  This causes a conflict with menu selection on windows
and immediately dismisses the disambiguation context menu.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1873
2020-11-30 08:51:09 -05:00
Jeff Young b171d381f0 Collapse Redraw3DView and Update3DView into a single routine.
Also fixes some errors about what the flag meant (model changed,
NOT redraw immediately).

Fixes https://gitlab.com/kicad/code/kicad/issues/6478
2020-11-29 21:08:30 +00:00
Jeff Young 889408c96a More improvements to new selection disambiguation.
Also a rationalization of text polygon generators, with the "standard"
version inherited from BOARD_ITEM now giving the bounding box.  This
requires callers who want the (much) more expensive stroke-based one
to call it explicitly (and brings PCB_TEXT in line with the was FP_TEXT
already was.

Fixes https://gitlab.com/kicad/code/kicad/issues/6525
2020-11-29 14:02:46 +00:00
Jeff Young 3c25abbf2f Ignore netcode when expanding track selections.
Fixes https://gitlab.com/kicad/code/kicad/issues/6529
2020-11-29 10:57:45 +00:00
Jeff Young b1adb93c16 PCB_GROUP_Ts need to be added and removed from view.
The SELECTION_TOOL's m_enteredGroup also needs to be updated when
said group is deleted via undo or redo.

Fixes https://gitlab.com/kicad/code/kicad/issues/6493
2020-11-27 23:34:58 +00:00
Jeff Young 896ad4a749 Rewrite PCBNew selection disambiguation based on shapes.
The new shape architecture gives us the opportunity to make text
selection much more intuitive by actually looking at the glyph
shapes.  Before text would be selected when you clicked in the
descenders area (which was usually blank given uppercase letters
and digits).

Fixes https://gitlab.com/kicad/code/kicad/issues/6525
2020-11-27 22:03:14 +00:00
Jeff Young 0293f880ec Fix a bunch of group issues with importing graphics.
Groups do not own their children; they only reference them.  That
being said, they do own *selection* and *moving* of their children.
This might address some of 6493, but in any case will be a
pre-requisite for fixing it.

Fixes https://gitlab.com/kicad/code/kicad/issues/6493
2020-11-27 22:03:14 +00:00
jean-pierre charras 5c08ad1ab9 Fix a few issues when copying a footprint from fp editor to clipboard, and paste it:
- ref and value texts were converted to user texts.
- fpid was left empty, thus creating a potential issue if pasted in the board editor.
Now:
- ref and value texts are no changed, and not copied is pasted in the footprint editor
(these texts already exist)
- a dummy fpid (clipboard:<md5 string>) is added if pasted in board editor
(Pasting a (partial) footprint from fp editor to a board editor is certainly not
a good idea but is possible)
2020-11-25 17:13:35 +01:00
Ian McInerney d50d728d19 Cleanup compiler warnings 2020-11-25 00:08:09 +00:00
Jeff Young 9c7c05c161 Mostly formatting cleanup but a few type-casting cleanups too. 2020-11-24 22:16:41 +00:00
Jeff Young 1391774f64 Re-factor boundary/courtyard checker error handling.
ADDED Footprint Checker dialog to display the results in.

Fixes https://gitlab.com/kicad/code/kicad/issues/6446
2020-11-21 20:57:35 +00:00
jean-pierre charras 22bbe9618e French translation update 2020-11-21 19:58:13 +01:00
Jeff Young ff3bd7e72a Fix a crash bug in DRC, and equate Margin to Edge.Cuts. 2020-11-20 21:22:27 +00:00
Jeff Young b123318cf6 Encourage use of full DRC for board & footprint malformed outlines.
It shows much more detail.  Removes some nag dialogs and places
hypertext links in others.

Also fixes the auto-layer-showing to correctly show Edge.Cuts or
F.CrtYd or B.CrtYd for errors relating to them.

Fixes https://gitlab.com/kicad/code/kicad/issues/6446
2020-11-20 17:24:52 +00:00
Jeff Young 9e9946628a Go back to arrow cursor on a cancel (or finish).
Fixes https://gitlab.com/kicad/code/kicad/issues/6421
2020-11-19 20:09:28 +00:00
Jeff Young 876b87b64e Minor performance fixes for PCBNew selections. 2020-11-19 17:23:02 +00:00
Jeff Young 04c84fa842 Remove some expensive trace calls. 2020-11-19 15:47:32 +00:00
Dominik Wernberger 99da663e82 Remove unused variables plus some more fixes from CppCheck
Remove unused variables plus a few more fixes from CppCheck

Remove unused variables plus a few more fixes from CppCheck
2020-11-19 02:28:47 +00:00
Jeff Young c1d1c12b41 Simplify message panel code.
We've had the colours turned off for two releases now without any
screaming or gnashing of teeth, so it's time to clean up the code.
2020-11-18 17:32:40 +00:00
Jeff Young bb3cbe3fa4 Pretty-up report a bit. 2020-11-18 00:17:07 +00:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Jeff Young dff5173baf Exorcise some instances of "modedit". 2020-11-17 16:05:48 +00:00
Jeff Young 1ce1e493d6 A rule zone is not really a BOARD_CONNECTED_ITEM.
Or at least it shouldn't always be treated as one.

Fixes https://gitlab.com/kicad/code/kicad/issues/6382
2020-11-15 20:23:15 +00:00
Jeff Young d094f86b1a Finish module cleanup (except for xpms). 2020-11-14 22:00:12 +00:00
Jeff Young 61bca4aaa4 A bit of "module" erradication, nameing conventions, and formatting. 2020-11-14 21:21:54 +00:00
Jeff Young 666c11965a Clean up some more MODULE terms. 2020-11-14 19:56:06 +00:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young ec020dd19f First-class support for filled shapes. 2020-11-14 01:40:32 +00:00
Jeff Young 86b6afd14b More cleanup of MODULE to see if it fixes SWIG error. 2020-11-13 21:07:36 +00:00
Roberto Fernandez Bautista b29cd8e3a1 Rewrite EDIT_TOOL::FilletTracks to only carry out the operation when one item is connected to the anchors
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6103
2020-11-13 17:43:21 +00:00
Roberto Fernandez Bautista bdc89df333 EDIT_TOOL::FilletTrack Change STATUS_TEXT_POPUP messages to an infobar instead 2020-11-13 17:43:21 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young 3451ac3088 PCB_MODULE_T -> PCB_FOOTPRINT_T 2020-11-13 15:16:24 +00:00
Jeff Young 52a46341db More module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young f5443de7f9 D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
Jeff Young 43001cae38 Simplify Net Inspector. (Remove via length and group sorting ctrls.)
Also renames files & classes to fit dialog title and updates method
names to match coding guidelines.
2020-11-11 14:41:17 +00:00
Jeff Young 812b714ccd More Module -> Footprint and a bit of formatting cleanup. 2020-11-10 20:53:12 +00:00
Jeff Young 6e0a40e32e Cleanup. Push more editing functions to toolset.
Also cleans up some more Module -> Footprint items.
2020-11-10 20:14:26 +00:00