302 Commits

Author SHA1 Message Date
John Beard
eedfb7a573 Pcbnew: pickup footprints by points, add a selection filter 2025-09-02 01:24:14 +08:00
Mark Roszko
4a4725c906 Avoid shadowed variable warning 2025-09-01 12:24:35 -04:00
John Beard
e016dc52fd Pcbnew: Add concept of a 'point'
This is a zero-dimensional object that can be used for snapping
and documentation of useful, but non-physical features on a
board or footprint. They do not correspond to any physical
output in exports or plots.

Points do have a "size", but this is a graphical property only
and determines how large they are drawn on the board.

They also have a layer, which allows them to be selected and
made visible according to layer filters.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/4691
2025-09-01 23:44:21 +08:00
Jeff Young
4024a15a17 Don't reference stack variables from a long-life lambda.
In particular, a lambda for conditional menus should
never capture more than `[this]`.  Even the tool's
frame pointer could change.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21615
2025-09-01 12:44:20 +01:00
Seth Hillbrand
a811f61c39 Make Expand Connection respect the filter
Prevents expansion that would require traversing elements that are
disabled in the selection filter

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21581
2025-08-29 16:11:38 -07:00
Seth Hillbrand
e8cec41355 ADDED: Indication of filter blocking
If the selection filter has blocked all selections under the cursor,
show a subtle flash on which filter(s) did the blocking.  Helpful for
people getting frustrated by not being able to select locked items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20487
2025-08-29 07:08:27 -07:00
Seth Hillbrand
c2f503774b Ensure that we use lasso when in the lasso mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21499
2025-08-20 12:48:03 -07:00
Mike Williams
97af2af779 design blocks / multichannel: basics of placing DB layout 2025-08-20 15:20:13 -04:00
Jeff Young
1ceac1dafd Simplify locking to just be another filter now that we don't have a dialog. 2025-08-20 15:24:36 +01:00
Jeff Young
6f389fd320 Tighten parent/child undo/redo architecture.
Always look for pre-existing undo/redo record.  Checking for IsNew()
is less robust and should be avoided.  Also moves the checking to a
location where it will be easier to ensure that it's uniform.

Push get-undo-level-item processing down a level so it is uniformly
called.

Make sure tables & labels are uniformly handled.

Remove incorrect usage of Get/SetGroupId() for storing lastPin
(which we don't use anyway).

Lists of deleted and changed items MUST include the screen pointer.
An item could be changed on one screen but not on another.

Also tightens handling of PCB_NETINFO_T items, which are not in the
view.

Also fixes a bug where there is no increment parameter if you assign
the base increment command to a hotkey.
(This was discovered while testing the above changes.)

Also fixes a bug where delete during a move in PCB Editor did an
undo instead of a delete.
(Again, found while testing above.)

An experiment was also run to collapse shared parts of SCH_EDIT_FRAME
and SYMBOL_EDITOR_FRAME into SCH_BASE_EDIT_FRAME.  However, sharing the
undo code actually increased complexity, and there was very little else
of value in SCH_BASE_EDIT_FRAME (other than the Increment() routines).
2025-08-18 19:20:09 +01:00
Jeff Young
60b4202766 CHANGED: Rework lock overrides architecture.
We now use a checkbox in the aux toolbar rather
than a query dialog (with "remember setting" checkbox).
2025-08-13 10:30:26 +01:00
Seth Hillbrand
73aa437259 Finalize lasso selection tool
- Move under rectangular selection
- Simplify available modes
- Link to new icon
- Make selection state persistent
- Allow additive/subtractive with KiCad configurable keys
2025-08-06 16:07:43 -07:00
Andrzej Wolski
c73d555fe2 ADDED: Lasso selection in pcbnew
Adds a lasso or freeform selection tool to KiCad in addition to standard
rectangular selection.  Adds supporting HitTest routines

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1977
2025-08-06 16:06:40 -07:00
Jeff Young
c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
Jeff Young
4137b9d31c Don't overflow int rebuilding selection rect (KICAD-E4J). 2025-07-14 13:17:53 +01:00
Wayne Stambaugh
718b7e744a Do not allow selection of excluded DRC markers when they are not visible.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21265
2025-07-13 18:13:35 -04:00
Jeff Young
d3046e6aee Don't steal unrelated timer events (potentially KICAD-XJN). 2025-07-13 16:30:03 +01:00
Jeff Young
d2a623719b Be consistent about getting board copper layers. 2025-07-09 13:05:22 +01:00
Jeff Young
f5f59e797d Make sure event has position before querying it (KICAD-796). 2025-07-01 21:17:22 -06:00
Jeff Young
5df676c1d0 Fixup. 2025-06-30 21:55:12 -06:00
Jeff Young
f5d2553161 static_cast safety. 2025-06-30 20:34:26 -06:00
Jeff Young
fc0bf1e8bd Allow move action when selection contains non-table-cells.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19982
2025-06-30 15:10:52 -06:00
Jeff Young
b7362c3fb5 Don't assume all EDA_ITEMs are BOARD_ITEMs (KICAD-KCZ). 2025-06-24 21:30:48 -06:00
Jeff Young
1bc60c32f0 Nullptr safety. 2025-06-15 21:45:09 +01:00
Jeff Young
e6d94d5b09 Repair saved locking logic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21090
2025-06-10 09:06:59 +01:00
Jeff Young
116bd924c2 Static cast safety.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20958
2025-06-08 23:21:02 +01:00
Jeff Young
f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
Mike Williams
8ec70ee92b PCB: unroute segment
Works like the backspace key in the router, but for segments that are
already placed.
2025-05-19 14:05:14 -04:00
Mike Williams
2baeecbee8 groups/design blocks add convenience methods for placing/updating 2025-05-15 14:26:56 -04:00
Mike Williams
d2f0a13515 groups/design blocks: add lib link to groups from design blocks
Also add Place Linked Design Block function.
2025-05-13 10:41:32 -04:00
Jeff Young
ecb5c5e0d4 Visibility control is for *filled* shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20635
2025-04-13 13:12:43 +01:00
Jeff Young
96491132ce Performance. 2025-04-05 22:18:17 +01:00
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Jeff Young
8ff0aafbb8 Handle groups in footprints when filtering selection. 2025-04-02 16:22:21 +01:00
Mike Williams
05e9772d54 groups: extract common class methods into EDA_GROUP base class 2025-04-01 14:34:20 -04:00
Mike Williams
5fd294cad2 eda frame: hoist FocusItem calls up a layer
Prep for SCH_GROUPs
2025-04-01 14:34:20 -04:00
Mike Williams
f40b24d04a groups: move actions to common actions 2025-04-01 14:34:20 -04:00
Mike Williams
a90b8ec57a pcb: merge RunOnChildren/Descendants into one function with a mode 2025-03-27 13:16:09 -04:00
Jeff Young
6e2914b990 Update terminology. 2025-03-25 12:05:54 +00:00
Mike Williams
18010b1104 selection: sort box selection by rows and columns by default
Some tools can take a selection order and it is nice to provide a
sane human-oriented default sorting when box selecting.
2025-03-19 10:25:35 -04:00
Jeff Young
8894c470ef Don't modify selection in the middle of a move/drag.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20239
2025-03-14 14:52:49 +00:00
Jeff Young
d0e86cad7c Disable multi-via dragging.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20150
2025-03-03 11:01:33 +00:00
Jeff Young
20f40c1030 Replace GetConnectedItems() type list with an EXCLUDE_ZONES flag.
The type list kept atrophying when various new
items were added (arcs, shapes).

And god knows what the purpose of putting PCB_FOOTPRINT_T
in some of them was.  As far as I can tell a CN_ITEMs
parent can never be a footprint.

(Also moves IGNORE_NETS to a flag so that we don't
end up with two booleans and the potential to have
them out-of-order.)
2025-02-26 11:02:10 +00:00
Jeff Young
5edae8250d Finish eradication of visibility flag on text items.
Import/read previously-hidden symbol/footprint
text items as hidden fields.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19875
2025-02-19 23:43:52 +00:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Seth Hillbrand
e9bc8cfe9d Give Clipper1 a Viking funeral
Clears out the last spot where we were only using Clipper1 (how'd I
miss that?) and remove all calls to the Clipper1 structures
2024-12-23 17:12:09 -08:00
JamesJCode
29798a6400 Allow DRC markers to be selected with area selection
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19258
2024-12-08 14:10:07 +00:00
JamesJCode
669be5378c Allow selection of PCB_MARKERs when not on active layer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19258
2024-12-06 22:02:06 +00:00
Jeff Young
30a7f537d7 Selection must be uniformly tracks/vias for multi-drag.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19166
2024-11-25 16:20:51 +00:00
Alex Shvartzkop
fee8560079 Don't modify m_selection while iterating over it in PCB editor.
This caused a fatal assert when selecting connected tracks with tuning patterns.
2024-11-23 13:54:03 +03:00