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).
The scope, recursion, reset options and message filters remain in the
user preferences. Others including numbering, sort order and reuse are
schematic preferences.
Also, the oddball subunit display remains here but it doesn't really
belong in annotation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17942
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.
Prevent the file formatter from writing and the file parser from loading
symbol pin alternates that have an empty name or when the alternate name
is the same as the default pin name. Apparently at some point they were
able to be created and saved.
Do not allow SCH_PIN::SetAlt() to set an alternate name when the name
does not exist in the library symbol pin alternate list. This required
fixing the associated QA test.
When updating or changing schematic symbols from library, reset the pin
alternate to the default when the alternate no longer exists in the
symbol.
Do not populate pin alternates context menu with duplicate default pin.
Clear orphaned pin alternates to the default when saving symbols from
symbol editor.
This is a re-implementation of 39c2745f55fff72470ca1ea86ac7b1ea225908bd
that was removed by e5089d783d08f75e57b3ea90ed64a089e5b07b0b
This implementation works in the tool, containing side effects
(hopefully) better than the initial implementation. The multiple labels
are input as multiple lines instead of labels with spaces, allowing for
copy/paste between spreadsheets of labels
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10950
We still conflate the fieldID, the position in the
array of fields, and whether or not that means the
field is mandatory. But this attempts to clean up
*some* of that, without introducing too much risk.
Cloning the item into the previewe means that if we later increment
it, the preview clone doesn't update. Use the non-owning preview
interface to use the item directly in the preview.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19433
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
Also adds a mode for AUTOADDED fields.
Also fixes a couple of bugs where a manual-level autoplaced
symbol would get reset back to auto-level when autoplaced.
It's possible you might want Exclude from Sim to be unit-specific,
but it's pretty hard to imagine how Exclude from Board, BOM,
or DNP could be unit-specific. (Maybe use a pill cutter on the chip?)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19029
The schematic commit system currently does not handle renaming symbols
in the symbol library editor or page settings in the schematic editor.
The schematic commit system will have to be modified to support the two
remaining direct calls to the undo/redo code.
Renaming a schematic sheet file can not be undone so it doesn't go
through the commit system. This meant that the schematic modified
flag was not getting set. If the only edit performed was renaming
a sheet file, the save modified flag would not get displayed when
closing the schematic editor.
Primary increment is the right most bit, secondary is the next
rightmost. So you can increment 'A1' to 'A2' or 'B1' with
Shift-Alt-Scroll and Ctrl-Alt-Scroll respectively.
These are context sensitive actions that increment "something"
about the selected item.
A generic 'increment' action can be produced, e.g. by other tools
or UI events, which has in increment step (positive or negative)
and an 'index' which determines what about the item should be
incremented - it's up to the increment action handler to decide
what that means.
And then add a primary and secondary inc/decrement action,
which allows to bind hotkeys to each.
Bind these to:
* Sym edit: increment pin names/number
increment text items
* Sch edit: increment lables and text
* FP/PCB: increment pin numbers
increment text items
This is useful when you want to copy text content out to some
external program (or put it in a text item/box).
I'm not sure it's possible to intuit exactly what a user wants,
as you will often want to copy items as the real items, and sometimes
as text. While KiCad might be able to make a smart guess, external
programs will have no chance!