Jon Evans
622c2f1316
Make sure connectivity is updated in undo/redo
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16945
2024-02-11 20:01:15 -05:00
Jeff Young
bce372c8a3
Don't clear the undo/redo list when we're just trimming it.
...
We only allow a certain number of commands on the lists
and trim them when they overflow. PCB_BASE_EDIT_FRAME and
PL_EDITOR_FRAME implemented this correctly; SCH_EDIT_FRAME
and SYMBOL_EDIT_FRAME did not.
2024-02-07 14:52:10 +00:00
Jeff Young
07cefa7883
More active tracking of undo/redo items.
2024-01-27 20:02:40 +00:00
Jeff Young
a8f6329590
Remove stale comment.
2024-01-27 15:52:59 +00:00
Jeff Young
68cbb820a7
performance efficiencies
2023-12-18 17:20:34 +00:00
Jeff Young
1b0cc82c56
Move a couple of stragglers to BOARD_COMMIT.
2023-12-17 21:01:31 +00:00
Jeff Young
b29a56530c
Remove undo-of-ungroup hack.
...
The hack assumed that the parent group would be the first
deleted item of type group in the undo list. While this
will be true when undoing a user ungroup command, it will
not be when undoing an ungroup side-effect, such as when a
member of a group is deleted during UpdateFromPCB.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16384
2023-12-17 15:35:35 +00:00
Jeff Young
9fb06f95a0
Fix msys2 build.
2023-12-16 16:17:24 +00:00
Jeff Young
ea3c87f243
Move group/ungroup to COMMIT infrastructure.
2023-12-16 14:17:25 +00:00
Jeff Young
504652b972
Regularize RunOnChildren() at the BOARD_ITEM level.
...
BOARD_ITEM sub-classes which don't have children simply don't
overrid it.
2023-10-14 15:04:18 +01:00
Jeff Young
78ee6f2e42
Fix a couple of undo bugs.
...
The first caused items coming back from undo to be hidden.
The second caused them to be ungrouped from the parent meander.
2023-10-12 17:54:34 +01:00
Alex Shvartzkop
be72e07e61
Introduce PCB_GENERATOR.
2023-10-08 02:41:17 +00:00
Jeff Young
69a1b30b8a
Implement undo/redo around Pad Edit Mode changes.
2023-09-01 18:48:46 +01:00
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.
2023-07-15 17:37:31 +01:00
Jeff Young
cf8294b5c2
Remove a bunch of blind (and a few redundant) static_casts.
2023-07-13 14:14:45 +01:00
jean-pierre charras
7ac0ca9c14
Pcbnew, undo_redo: Do not cast to BOARD_ITEM items that are only EDA_ITEM
...
A BOARD_ITEM is derived from EDA_ITEM, so the cast is not possible
Fixes #15177
https://gitlab.com/kicad/code/kicad/-/issues/15177
2023-07-13 10:53:50 +02:00
Jeff Young
d5b5a3eaf4
Add action info to Undo/Redo menus.
...
Note that this only works where a BOARD_COMMIT or SCHEMATIC_COMMIT is used.
(BOARD_COMMIT is used almost universally in PCBNew, but SCHEMATIC_COMMIT
has very little adoption in EEschema so far.)
2023-06-07 14:37:34 +01:00
Jeff Young
4a3f77cd9d
Clear board soldermask when undoing/redoing items that affect it.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13446
2023-04-15 00:06:58 +01:00
Jeff Young
bba8a0826e
Clear caches before undo operation.
...
The undo will remove/re-add items to the view in order to update the
RTree. However, if we only clear caches at the end (in the OnModify
call), then the (stale) bbox caches are still used for the re-add
operation, and they end up at the wrong place in the RTree.
Fixes https://gitlab.com/kicad/code/kicad/issues/13048
2022-12-02 10:59:48 +00:00
Jeff Young
13f5c78e89
More tightening of group parent lifecycles.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12908
2022-11-16 00:42:38 +00:00
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
2022-11-11 17:27:28 +00:00
Jeff Young
16d5c43c14
Fix shadowed variable.
2022-09-25 22:04:56 +01:00
Jeff Young
b4701593fb
Restore parent group pointers on undo.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11914
2022-09-25 21:45:29 +01:00
Seth Hillbrand
fab78af176
Remove TEDIT
...
This marker is not used in KiCad and creates merge conflicts when two
different users edit the same file
2022-03-01 00:25:44 +00:00
Jeff Young
bc51c89c90
Reconcile zone-auto-fill with undo.
2022-02-25 13:05:49 +00:00
Jeff Young
7ccac79192
More wxString wide literals.
2022-02-05 21:29:34 +00:00
jean-pierre charras
30c001265b
pcbnew, undo_redo.cpp: fix a logical bug that can hang in rare cases.
2021-09-08 13:06:55 +02:00
jean-pierre charras
6c7c9ca50c
Fix compil warnings (UNDO_REDO::GROUP renamed to UNDO_REDO::REGROUP to fix
...
collision name with a widows header on msys2)
2021-08-28 11:44:01 +02:00
Wayne Stambaugh
cf00319c85
More NULL expunging.
2021-07-20 07:27:18 -04:00
Jeff Young
66eb2ddeb5
Remove auto when not needed for line length.
2021-07-07 20:05:50 +01:00
Jeff Young
096e342386
Prefix TRACK, ARC and VIA.
2021-06-11 22:07:02 +01:00
Jeff Young
16b0147af8
Prefix DIMENSION types.
2021-06-11 17:59:44 +01:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Marek Roszko
10e60acf34
Clean up including of board_design_settings.h
2021-06-06 15:03:42 -04:00
Marek Roszko
4712d7a918
Remove a leaky wx/msgdlg.h include
2021-06-06 08:45:38 -04:00
Ian McInerney
23f8851409
Remove pcb_group include from board header
2021-06-03 20:03:31 +01:00
Jeff Young
a577b6386d
Fix missing status bar update after undo/redo.
...
(Reported by Franck.)
2021-04-17 17:21:54 +01:00
Jeff Young
a3b9e8ddb4
Round 2 of Worksheet -> Drawing Sheet.
2021-02-23 11:57:44 +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
b08862e445
Fix group undo/redo bugs.
...
1) Don't remove items from group when the group is being deleted as
well. We need those pointers for undo/redo.
2) Flip the GROUP/UNGROUP undo status when undoing/redoing group and
ungroup actions.
3) Remove PCB_GROUP_T from the rebuild-netlists section. Nothing
about an item's group/ungrouped status changes its netlisting.
4) Add PCB_PAD_T to the rebuild-netlists section. It can probably
only happen in the footprint editor where we don't care about
netlisting, but it's conceptually more correct and who knows what
might change in the future....
Fixes https://gitlab.com/kicad/code/kicad/issues/7540
2021-02-15 14:13:43 +00:00
Seth Hillbrand
8c2fe42ef0
More Undo/Redo Cleanup.
...
Don't need the reference point or container action type. Clearing this
command signatures to prevent future confusion/use
2021-02-12 11:26:48 -08:00
Seth Hillbrand
d244c09680
Cleanup undo/redo
...
Mirror/Rotate/etc were all just "Change" items in the undo/redo stack.
This removes the old calls
2021-02-12 10:25:14 -08:00
Marek Roszko
9695717a46
Fix assert in SwapItemData
2021-02-01 19:29:58 -05: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
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
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
522d64968e
Yet more module -> footprint.
2020-11-13 15:16:24 +00:00
Jeff Young
52a46341db
More module -> footprint.
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