354 Commits

Author SHA1 Message Date
Seth Hillbrand
ef602be91f Allow drawing subsheet with click+drag
Interestingly, the majority of people in a KiCad training course wanted
to draw subsheets this way.  There is no real reason to keep the
existing select behavior, so this greases some skids
2025-09-10 21:55:31 -07:00
Seth Hillbrand
ceed9ca5f8 ADDED: Place missing units
Adds a contextual menu for symbols that will look for units that are not
currently instantiated and offer to place them
2025-09-08 16:38:49 -07:00
jean-pierre charras
4953e80122 Fix some compil warnings 2025-09-01 16:22:05 +02:00
Jeff Young
4024a15a17 Don't reference stack variables from a long-life lambda.
In particular, a lambda for conditional menus should
never capture more than `[this]`.  Even the tool's
frame pointer could change.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21615
2025-09-01 12:44:20 +01:00
Jeff Young
0c8e7a7137 Reload symbol chooser on keep symbol, and improve accessibility.
(Respond to hotkey-generated clicks.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7698
2025-09-01 11:45:20 +01:00
Jeff Young
9d7db3d135 Better interactive feedback.
Don't wait for mouse to move before refreshing after a command.

Also fixes a crash bug deleting an item after an
Unstage() (the Unstage() has already deleted the item).

Also fixes a crash when changing label type during
creation of a label produces a mess.

Also Keep cursor aligned to grid when not warping
back to original point.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16828
2025-08-31 14:25:52 +01:00
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
Seth Hillbrand
66c42f396c Ensure junction placed is placed
Added QA to maintain this

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21516
2025-08-24 10:22:12 -07:00
Mike Williams
2abeb5cb49 sch design blocks: add suffix to grouped and repeated placements 2025-08-20 15:20:13 -04: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
188ffda029 Add a 90°-only mode for polygon creation
Sometimes, you don't want those 45° corners in your nice, clean zones.
This adds an additional mode that can be selected, cycling through
free-angle, 45° angle and 90° angle constraints
2025-08-12 16:48:36 -07: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
Jeff Young
833a5ee3ab Yet even more open-coded dialog state-saving cleanup. 2025-08-11 20:36:23 +01:00
Seth Hillbrand
15166a9f14 Refactor REFDES_TRACKER
Keep state for reuse in the class.  This allows us to properly pick the
value when fully reannotating

Don't annotate when placing new units.  Just step ahead in the unit
value while keeping the refdes number constant.  This eliminates the
jumping around to unplaced units when placing new multi-unit symbols

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21378
2025-07-25 16:16:09 -07:00
Seth Hillbrand
e387953490 ADDED refdes tracker
Provide an option to track ever reference designator ever used in the
project to prevent its reuse even if the component has been removed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13052
2025-07-23 14:28:33 -07:00
Jeff Young
5fb40f152c Make auto-created labels work with new multi-create architecture.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21306
2025-07-17 18:28:33 +01:00
Jeff Young
b498ca0376 Commit messages are title caps.
(They appear in the Undo menu.)
2025-07-12 15:53:17 +01:00
Jeff Young
a7319bfcd0 Tool loop safety. 2025-07-03 20:01:35 -06:00
Jeff Young
e48d746bbb Must show a dialog for it to be useful. 2025-06-25 15:51:53 -06:00
Jeff Young
9add4a39c8 Must call SetPassEvent() for event to run in its own loop.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19805
2025-06-25 15:33:12 -06:00
Jeff Young
ac6e38fe2c Formatting. 2025-06-25 15:17:53 -06:00
Jeff Young
f76608c0da Nullptr safety. 2025-06-09 12:54:30 +01:00
Jeff Young
1968d67bf3 Prefer const& to passing by value. 2025-06-06 18:28:39 +01:00
Marek Roszko
1da8ddbadd Move CleanUp to SCHEMATIC 2025-06-04 20:33:48 -04:00
Jeff Young
96dfff2f07 Better solution to memory leaks. 2025-05-25 11:19:09 +01: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
Seth Hillbrand
2e357fbfa0 Protect tool against null selection 2025-05-14 16:43:17 -07:00
Mike Williams
d2f0a13515 groups/design blocks: add lib link to groups from design blocks
Also add Place Linked Design Block function.
2025-05-13 10:41:32 -04:00
Mike Williams
9ca881112b design blocks: as place as group functionality to schematic 2025-05-06 11:29:42 -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
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Mike Williams
c67924ccac schematic: convert RunOnChildren to also take recursion mode argument
Prepping for SCH_GROUPS, making consistent with the PCB code.
2025-03-27 13:16:09 -04:00
Mike Williams
e11cf94a3e design blocks: add PCB design blocks behind advanced config
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2508
2025-03-20 15:13:52 -04:00
Jeff Young
5996cffabc EE -> SCH (no functional changes) 2025-03-13 13:15:47 +00:00
Seth Hillbrand
49a4699d5a ADDED: Local power symbol option
Local power symbols work like regular power symbols except that they are
scoped only the the sheet in which they are instantiated

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2075
2025-03-04 17:07:46 -08: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
Seth Hillbrand
b21814b973 Global labels are labels too
And without knowing that they are labels, we might accidentally think
that they are text items, crashing KiCad.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20174
2025-03-01 13:34:32 -08:00
Dhineshkumar S
20c72504c3 Eeschema: Import and auto place all sheet pins
https://gitlab.com/kicad/code/kicad/-/issues/6736
2025-02-26 21:24:02 +00:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Jeff Young
d921a4e916 Switch to using unit names in property inspector. 2025-02-19 23:43:53 +00:00
Damjan
46ada43166 Eeschema: Import sheet pins: sort pin names intelligently 2025-01-29 04:16:35 +00:00
Jeff Young
fccb661487 More MANDATORY_FIELDS work.
Also fixes a crasher when Cancelling a FIELDS_GRID
dialog with one of the grid editors currently open.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19762
2025-01-27 17:02:17 +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
Jon Evans
6858561731 Fixes for building against recent wxWidgets 3.3 2025-01-09 08:38:49 -05: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
John Beard
85552c7a4f SVG import: import beziers as beziers
This maintains a little bit more editability and avoid importing
thousands of tiny line segments when not required.
2025-01-01 01:14:41 +08:00
Ethan Chien
b03c591a4b Sync Sheet Pins: Synchronizes all selected rows. 2024-12-31 02:58:35 +08:00
Ethan Chien
dea53b7b60 Sync Sheet Pins: Add checks for empty sheet paths and display an info message when no sub schematic is found 2024-12-30 13:45:50 +08:00
Jeff Young
bcf810b05c Formatting. 2024-12-27 18:59:22 +00:00
Ethan Chien
bf2094dd8a Place Sheet Pins: Restore the behavior to match the original Import Sheet Pins tool. 2024-12-26 19:34:59 +08:00