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
3 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
3 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).
3 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.
3 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.
3 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
3 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.
3 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
Jeff Young
138f835672
Retire group bbox cache.
It's too hard to maintain when changes to other items (the groups
members) affect it.
3 years ago
Jeff Young
03ba14c6d3
Tighten lifecycle management of parent group pointers.
Also adds some debugging to try to catch dangling pointers.
Also adds a cache for group bounding boxes (which will be expensive
to calculate for large groups).
Fixes https://gitlab.com/kicad/code/kicad/issues/12875
3 years ago
Jeff Young
2cfe78170c
Honour selection filter when picking move anchors.
Fixes https://gitlab.com/kicad/code/kicad/issues/12773
3 years ago
Jeff Young
bb618f2d55
Update pointEditor after cancelled move.
3 years ago
Jeff Young
e3842514e7
Move courtyard collision setting to preferences.
Also cleans up PCBNew/FPEditor edit options panel to be more in sync
with each other.
3 years ago
Jeff Young
e9f8454a67
No DRC engine in footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/12658
3 years ago
Jeff Young
de5980b92e
Share more of the courtyard collision highlighting code.
3 years ago
Jeff Young
11dc5424cb
Pull interactive courtyard checker out of move tool to share with router.
Fixes https://gitlab.com/kicad/code/kicad/issues/12594
3 years ago
Jeff Young
8f1b4a9c03
Include cleanup.
3 years ago
Jeff Young
79dabdd484
Fix typo.
3 years ago
Jeff Young
04fec5016b
Add keepout zones set to keepout footprints to footprint courtyard checker.
(This is for the move tool, not DRC. DRC uses more sophisticated keepout
processing which is too slow for the move tool, and doesn't let us know which
keepout area collided for collision highlighting.)
Fixes https://gitlab.com/kicad/code/kicad/issues/12594
3 years ago
Jeff Young
ba630971af
Possible fix for move/esc/esc crash.
Fixes https://gitlab.com/kicad/code/kicad/issues/12553
3 years ago
Mike Williams
c1da59b560
Swap: disallow swapping tracks / wires
Also fix missed shortcut change for S -> Shift-S
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12538
3 years ago
Alex
4095172259
ADDED: Pack and Move Footprints, improved footprint spread algorithm.
3 years ago
Mike Williams
e66393c4dd
PCB Tools: Move Individually
Allows moving a selection of components one by one.
3 years ago
Jeff Young
513fc872bb
Support both X and Y mirroring in FPEditor.
Fixes https://gitlab.com/kicad/code/kicad/issues/12409
3 years ago