Jeff Young
e445249720
ADDED: PCB tables.
2 years ago
Jeff Young
e7f18e7eab
Warp after context menu only if actively drawing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11080
(cherry picked from commit 1a7152d3eb
)
2 years ago
Jeff Young
e68cd04d48
Don't modify reference point if already moving.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16524
(cherry picked from commit 08da9a4494
)
2 years ago
Alex Shvartzkop
59a0635b09
Disable local ratsnest when moving generators (tuning patterns).
They're not moving like normal objects, leaving ghost ratsnest.
2 years ago
Jeff Young
37c185f437
Remove overly-complex snapping layer for moving objects.
We now have a hotkey to select Active Layer vs All Layers,
which gives the user more control.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16683
2 years ago
Jeff Young
c3e3f3bcb8
Possible fix for move individually.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16087
2 years ago
Jeff Young
6a5adc7646
Record nested footprints for collision checking.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16410
2 years ago
Jeff Young
16c8050f3d
Fix event/flag race condition.
2 years ago
Alex Shvartzkop
05e954ad5d
Fixes for length tuning patterns.
2 years ago
Jeff Young
cc721c4907
Improve encapsulation of group internals.
(It's still leaking into BOARD_COMMIT and some other places, but at
least it no longer leaks into all the edit tools.)
Also fixes some bugs when moving/copying/pasting multiple selections
containing length-tuning patterns.
2 years ago
jean-pierre charras
d90981d981
Pcbnew: fix Swap command that improperly rotates footprints when flipping.
Fixes #16025
https://gitlab.com/kicad/code/kicad/-/issues/16025
2 years ago
Jeff Young
ad676e22b8
Don't push a commit we don't own.
2 years ago
Jeff Young
16ec0faa7a
Reduce line-breaking.
Also simplifies handling of generator properties dialogs.
2 years ago
Jeff Young
2bc273f8bc
Don't fire event-parameter asserts when looking for a click event.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/KICAD-2CK
2 years ago
Jeff Young
d3b50f0607
Cleanup (no functional changes).
2 years ago
Alex Shvartzkop
be72e07e61
Introduce PCB_GENERATOR.
2 years ago
Marek Roszko
22b733209d
Fail GAL on its header leaking audit
Maybe we should rethink directly accessing GAL so much, but at least 600 files didn't need GAL leaked into them due to view_overlay.h
2 years ago
Alex Shvartzkop
06463fd35a
Fixes for Wayland cursor warping:
- Emulate the mouse position, since no motion events are sent after warp
- Do not call wl_surface_commit to prevent an assert
- Re-organize code a bit
2 years ago
Jeff Young
9bba8e5956
Don't allow duplication of footprint items outside of footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15487
2 years ago
Jeff Young
a24a8aaca7
Don't start a pack&move when already in an EDIT_TOOL drag or move.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15545
2 years ago
Mike Williams
d9c2e0ab54
PCB: start of grid overrides
Only works for moves.
2 years ago
Jeff Young
1218f61d0a
Implement undo/redo for footprint children.
Our special-cases to handle the fact that we didn't do this had far
outgrown the code necessary to actually handle it.
2 years ago
Jeff Young
cf8294b5c2
Remove a bunch of blind (and a few redundant) static_casts.
2 years ago
StuartTylerRelytDesigns
d26aa7dc20
Pcbnew moveIndividually ctrl-M mangles 2+ tracks
CHANGED: moveIndividually ctrl-M not mangle tracks and add grid snapping
Fixes https://gitlab.com/kicad/code/kicad/issues/15124
2 years ago
Jeff Young
7ed5963b4f
Disable positioning tools when a move is in progress.
Also fixes a typo in EDIT_TOOL::doMoveSelection().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15090
2 years ago
Jeff Young
773e1a1ab6
Actions with a COMMIT must be run synchronously.
Note that "immediate" doesn't mean quite the same thing: while it will
enter the tool immediately, it won't necessarily finish the tool during
the call if the tool has an event loop. So for something like Rotate
"immediate" and "synchronous" have the same behaviour, but for something
like Move they do not.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15085
2 years ago
Jeff Young
1411b09178
Remove EDIT_TOOL's quasi-global BOARD_COMMIT.
It had several encapsulation leakage issues, as well as poorly-defined
behaviour of undo for chained-actions (append-to-board, and then rotate
while moving, for instance).
2 years ago
Ian McInerney
2fb6f19a84
Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2 years ago
Ian McInerney
f14feafc6b
Convert selection vector to EDA_ITEMS for base tool call
The base tool expects a generic EDA_ITEMS, but the existing vector
doesn't easily cast, so add a temporary one.
2 years ago
Ian McInerney
b04e54dbea
Switch TOOL_EVENT and TOOL_ACTION to have a std::any parameter
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
3 years ago
Marek Roszko
b41606ecf7
Use the correct printf format for the move individually status text
Fixes sentry KICAD-1ZT
2 years ago
Lucas Dumont
c781fde236
pcbnew: don't move twice
In pcbnew, if you press M to move your selection and press M again, then escape, you will trigger the https://gitlab.com/kicad/code/kicad/-/blob/master/common/tool/tools_holder.cpp#L106 assert
3 years ago
jean-pierre charras
2f392352b5
EDIT_TOOL::doMoveSelection(): avoid calling PushTool() and, just after,PopTool()
for the *same* event: TOOLS_HOLDER::PopTool() does not work fine in this case.
2 years ago
Jeff Young
28028c941e
Retire Local/Draw coords distinction from PAD (the last object to have it).
3 years ago
Jeff Young
bbd6c80507
Collapse FP_* down into their PCB_* equivalents.
3 years ago
Marek Roszko
4665823089
Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.
In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments
MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
3 years ago
Mike Williams
47dc2379d8
PCB: Fix issues with grab unconnected
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13232
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13233
3 years ago
Alex
75053cfc57
Remove normally unused code from Move function.
Fixes https://gitlab.com/kicad/code/kicad/issues/13222
3 years ago
Seth Hillbrand
4fe35d0df1
More push/pop tool issues
We need to pop the move tool off when it doesn't find anything to act on
so that the pushed tools under it on the stack can re-activate
Fixes https://gitlab.com/kicad/code/kicad/issues/13114
3 years ago
jean-pierre charras
96a9ec4a0c
Enhance compatibility with V6.0 for Intersheetrefs fields associated to GLOBAL labels.
In V6.0, the identifier is "Intersheet References" and was not immediately
seen as Intersheetrefs field.
3 years ago
Alex
b4b25a7009
Fix Pack & Move footprints when working with groups.
3 years ago
Alex
c1f82d0c80
Canceling Move cancels Pack too in Pack & Move footprints.
3 years ago
Jon Evans
0bc06d506c
Properties: reselect after canceled move
3 years ago
Mike Williams
17bb57cc73
PCB: fix stale ratsnest between moves in Move Individually
3 years ago
Mike Williams
ad6ef35c9f
PCB: Add skip action to Move Individually
3 years ago
Mike Williams
4a4fab78a3
PCB: allow swap while moving
3 years ago
Jeff Young
9724f6e736
Don't allow zone filling during other editing operations.
It's a very heavy op, and is likely to violate all manner of
assumptions the other ops make.
Fixes https://gitlab.com/kicad/code/kicad/issues/12736
3 years ago
jean-pierre charras
f51db4e093
Fix some Coverity and compil warnings.
3 years ago
Jeff Young
7089e99f4b
Integrate move individually into move algo so other commands don't choke.
Also adds commands to cancel and finish move individually.
Fixes https://gitlab.com/kicad/code/kicad/issues/12750
Fixes https://gitlab.com/kicad/code/kicad/issues/12749
3 years ago
Jeff Young
d9987e9569
Orig_items will have been invalidated by Revert.
Don't use it to rebuild the selection. Use the board_item flags instead.
Fixes https://gitlab.com/kicad/code/kicad/issues/12882
3 years ago