468 Commits

Author SHA1 Message Date
Jeff Young
6dd4e01f16 ADDED: custom body styles.
(Also moves editing of unit display names to the
Symbol Properties dialog and retires the Set Unit
Display Name dialog.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16069

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14843
2025-08-27 18:11:56 +01:00
jean-pierre charras
f3c222f5ba Compil issue: add missing include on MSYS2 2025-08-24 09:01:25 +02:00
Seth Hillbrand
f415ba78fa ADDED: Drag and drop images into schematic editor
Also fixed paste so that the image attaches to the cursor for placement

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15379
2025-08-23 06:38:59 -07:00
Seth Hillbrand
0586f02f00 Move wire/junction actions out of SCHEMATIC
They are tool actions and require that the tool holder is valid, so they
really need to be where this is only ever true

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21510
2025-08-19 15:47:54 -07: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
Seth Hillbrand
87ccb2abc0 Move Annotation preferences (most) to schematic setup
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
2025-08-12 16:15:17 -07:00
Seth Hillbrand
4aa2047f45 Replace alg::delete and alg::delete_if with std c++20 2025-08-04 09:03:16 -07:00
Jeff Young
a191d4e6e5 Handle undo when changing new item before placing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21391
2025-07-27 15:56:16 +01:00
Jeff Young
ec155c00f3 Comboboxes for units and body styles.
Also for pin-types in pad properties.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19904

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19905
2025-07-23 14:35:37 +01:00
Jeff Young
69b23df4c3 Make sure we don't end up with stale picker handlers (lots of Sentry tickets). 2025-07-04 12:10:59 -06:00
Dhineshkumar S
f650999004 Eeschema: Add option to show unconnected wire crossings as hop-overs. 2025-06-15 16:53:40 +02:00
Jeff Young
18e107529a Don't force callers of GetAppSettings to implement exception processing. 2025-06-14 20:25:59 +01:00
Jeff Young
7fbf51b17c Be more pedantic about RECURSE_MODE.
Also fixes an invalid iterator bug.

Also adds mirroring support for PCB_GROUPs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21107
2025-06-12 11:21:28 +01:00
Mike Williams
65e282e6e1 schematic: break/slice will temporarily switch to free angle mode
Otherwise operations like breaking a wire in orthogonal mode simply
don't make sense.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13394
2025-06-09 12:16:21 -04:00
Mike Williams
b440349586 schematic: better implementation of repeated break 2025-06-09 11:41:41 -04:00
Mike Williams
cd85226c1a schematic: make break wire a repeat-until-cancel action
User requested feature.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13392
2025-06-09 11:27:06 -04:00
Mike Williams
6acb2114ed sch: don't make cancelled break wire invisible
I'm not entirely sure why this can't be added to the selection, but
removing the selection fixes the behavior.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19847
2025-06-09 10:49:25 -04:00
Jeff Young
6609e79868 Nullptr safety. 2025-06-05 18:01:44 +01:00
jean-pierre charras
a04bead8b0 Eeschema: fix crash when trying to edit a non symbol field using U,V or F
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21072
2025-06-05 16:39:50 +02:00
Marek Roszko
1da8ddbadd Move CleanUp to SCHEMATIC 2025-06-04 20:33:48 -04:00
Marek Roszko
fcc09a5ce6 Move BreakSegment(s/OnJunction) out of SCH_EDIT_FRAME 2025-06-04 20:33:47 -04: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
Wayne Stambaugh
d16d2f5a5b Fix a cadre of symbol pin alternate issues.
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.
2025-05-17 14:20:07 -04:00
Mike Williams
94b7d48f62 sch groups: fix walking text when rotating a single group
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20712
2025-05-05 10:54:18 -04:00
Jeff Young
b01fef5ca8 Update visibility flag when adding fields.
Also removes extra c'tor which fails to set the
ordinal.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20556
2025-04-26 16:37:36 +01:00
Mike Williams
6a24c5c5a4 sch groups: add delete support 2025-04-21 07:50:05 -04:00
Mike Williams
cdac27b2bc sch groups: implement rotate/mirror 2025-04-15 10:19:40 -04:00
Mike Williams
5db091fc79 sch groups: clear group membership on destruction, add tests 2025-04-15 10:14:38 -04:00
Mike Williams
0c0dbc6271 groups: commonize group tool 2025-04-15 09:59:38 -04:00
Matt Kosman
0890d3f1cb remove text angle reset when rotating multiple fields
The fields were properly rotated by field->rotate and don't need additional setting of the text angle.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19366
2025-04-12 16:11:05 -07:00
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Jeff Young
5996cffabc EE -> SCH (no functional changes) 2025-03-13 13:15:47 +00:00
Seth Hillbrand
6f6ca2a35f Allow multi label input
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
2025-03-03 09:03:02 -08:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Seth Hillbrand
0144352132 Remove unused captures 2025-02-11 09:50:23 -08:00
Seth Hillbrand
7717c1e7d9 Fix menu display of symbol attributes
Menu should display the current attribute of the selection and allow
changes, rather than three different options on set/unset/toggle.
2025-02-11 09:24:49 -08:00
Ian McInerney
7bf40b82d0 Use correct bitmap for body style menu
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19416
2025-02-09 00:58:16 +00:00
Jeff Young
25379b3094 Honour hover selections. 2025-01-27 20:30:45 +00:00
Jeff Young
a0dd0485e9 Pull a little harder on the MANDATORY_FIELDs string.
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.
2025-01-21 16:48:13 +00:00
Jeff Young
d50b69f1ae Reconcile divergence of MANDATORY_FIELDS between symbols and footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19697
2025-01-21 13:28:28 +00:00
John Beard
d55877ce27 Increment tool: use parent commit when appropriate, avoid double preview
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
2025-01-15 00:26:09 +08: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
Jeff Young
eee28aa06a Clean up fields autoplacement control architecture.
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.
2024-12-23 14:30:17 +00:00
Jeff Young
5b03426e28 Update attributes across units.
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
2024-12-21 12:17:00 +00:00
Wayne Stambaugh
424438ace1 Convert remaining schematic undo/redo calls to commit system.
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.
2024-12-20 09:54:24 -05:00
Jeff Young
2926db778c Bug fixes for rotated tables. 2024-12-16 13:26:48 +00:00
Jeff Young
753d385473 Reduce dependency on dynamic_cast.
Also switches to checking __clang__ instead of __WXMAC__.
2024-12-08 21:46:54 +00:00
Wayne Stambaugh
8498889da2 Show save modified dialog on schematic sheet file rename.
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.
2024-12-02 08:39:08 -05:00
Wayne Stambaugh
302dfb4623 Fix crash when changing sheet file name and search panel is visible.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19232
2024-12-01 13:09:59 -05:00
John Beard
e9014bc27b Eeschema: show which units are already placed in the context menu
Otherwise it's annoying to fingure out 1) i you're missing any
and 2) if you change one, are you going to stomp on something?
2024-10-27 05:13:32 +08:00