555 Commits

Author SHA1 Message Date
jean-pierre charras
2346be9768 Fix compil warnings 2025-09-03 09:43:41 +02:00
Jeff Young
cff261ce2e Don't allow stack addresses to escape via long-life handlers. 2025-09-02 14:19:17 +01:00
John Beard
4bebd09bd0 EDA_LIST_DIALOG: Simplify ctor args
Sometimes you want to add these in the ctor of the child
class based on some logic and having to construct the vector
in the init-list is a bit ugly.

Theoretically allows to not require a vector too.
2025-08-26 23:34:46 +08: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
Jeff Young
73bb65b802 Formatting. 2025-08-21 12:29:34 +01:00
Jeff Young
42735b775d Remove unreachable PASTE_MODE.
Also, don't depend on enum order.

Fixes KICAD-YJ8.
2025-08-21 12:29:34 +01:00
JamesJCode
ee9e94df04 Don't assume SCH_SYMBOLs have a LIB_SYMBOL when resolving embedded files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21497
2025-08-18 20:30:33 +01:00
Jeff Young
30637e65b0 Move dirtyConnectivity up a level. 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
John Beard
d1aa7b148a Eeschema/Pcbnew: allow multiple nets to be assigned to a netclass at once
There is only a simplistic multi-net pattern expression
generator here (A|B|...) with a single prefix detected
rather than anything too fancy.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/21451
2025-08-12 20:00:33 +08:00
Jeff Young
892f9031d7 More open-coded dialog state-saving cleanup. 2025-08-10 21:00:17 +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
fd7abdfdd5 Bug fix for RefDes Tracker
When pasting, set the pastedSheetPath reference list tracker.  This is a
follow-on fix for https://gitlab.com/kicad/code/kicad/-/issues/13052
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
55a36c1ce7 CHANGED: retire the select-lib-table dialogs.
We now allow the user to specify which in the
New Library dialog.

Also retires the "Export power symbols too" dialog.

Also gives a bunch of file and library dialogs
more explicit titles.

Also removes separate code-paths for Export to
Library and Export to New Library.  The regular
code path has a "New Library..." button now.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16323
2025-07-20 19:06:40 +01:00
jean-pierre charras
5f8547dc7e Minor compil warnings fixes. 2025-07-09 15:38:33 +02:00
Jeff Young
0ba617bf1a MakeNetNavigatorNode() will attempt to select it (while frozen). KICAD-VV8 2025-07-08 09:42:19 +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
Alex Shvartzkop
4a5039c2cf Remove some unused variables. 2025-07-02 16:48:26 +03:00
Jeff Young
c573825a49 Formatting; reduce asserts. 2025-06-30 23:34:54 -06: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
Jeff Young
1968d67bf3 Prefer const& to passing by value. 2025-06-06 18:28:39 +01:00
Jeff Young
327cca9de5 Coverity fixes. 2025-05-25 20:01:18 +01:00
Jeff Young
96dfff2f07 Better solution to memory leaks. 2025-05-25 11:19:09 +01:00
Jeff Young
d2305957d8 Reduce designBlock memory leaks. 2025-05-25 09:28:37 +01:00
Jeff Young
42c68f1a16 Uniform application of recursion guards in simulation code. 2025-05-25 09:09:11 +01:00
Mark Roszko
280031f6e0 Prevent oob string access in SCH_REFERENCE::IsSplitNeeded
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20948


(cherry picked from commit 10c7796336fcd9f00737f484fa497c6d2cec64c1)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-05-24 04:02:20 +00: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
Mike Williams
2baeecbee8 groups/design blocks add convenience methods for placing/updating 2025-05-15 14:26:56 -04:00
Mike Williams
3112a0b38b sch groups: fix grid alignment on copy/paste
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20823
2025-05-05 10:02:03 -04:00
Seth Hillbrand
fd0b8fcc3c Add paste length control to PCB Editor as well
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20732
2025-04-30 13:29:52 -07:00
Seth Hillbrand
c5fde2aeb5 Add maximum pasted string length
Allows the user to avoid pasting unparsable boards as strings, which
freezes the system as we try to display enormous texts

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20732
2025-04-30 13:22:57 -07:00
Jeff Young
524575a595 Allow embedded files to come from components
as well as parent containers, part II.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20210
2025-04-25 12:26:31 +01:00
Mike Williams
54681278c5 sch groups: don't double move on paste 2025-04-21 09:28:27 -04:00
Andrej Valek
9364bcdc9e SCH_EDITOR_CONTROL(paste): fix wrong cut behaviour
There was a missing behaviour when explicit removed annotation via specialpaste was requested. Add there a variable to compare the paste options.
2025-04-15 09:38:48 -07:00
Mike Williams
e64eeb0161 sch groups: make copy/paste work
Need to expand selection on copy
2025-04-15 10:19:40 -04:00
Mike Williams
a57cd8a207 sch: don't remove/add items to selection while iterating
Likely needs backport
2025-04-15 10:19:40 -04:00
Andrej Valek
069954fa31 SCH_EDITOR_CONTROL(paste): make the annotation working again
The pasteMode was enforced to UNIQUE_ANNOTATIONS and not respecting the
value in settings. Basically revert the old behavior with respecting the
KIID generation.

Fixes kicad/code/kicad#19828
2025-04-12 14:06:13 -07:00
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Jeff Young
7ba07a3bb0 Use action to change current sheet.
That way it gets into the navigation hierarchy,
the current zoom gets saved, etc.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20466
2025-03-27 17:56:53 +00: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
Wayne Stambaugh
b364f5dbde Properly prevent duplicate sheet names on paste.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20357
2025-03-17 12:02:01 -04:00
Jeff Young
5996cffabc EE -> SCH (no functional changes) 2025-03-13 13:15:47 +00:00
Jeff Young
7401b57fcb Warning messages for simulation tuning.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20274
2025-03-11 11:02:20 +00:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Seth Hillbrand
157c7422b0 Allow sim models to reference embedded files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20024
2025-02-22 14:53:59 -08:00
Seth Hillbrand
d2f780dfb4 Prevent image duplication
Duplicate ancillary clipboard needs to be tested with the existence of
an image when pasting

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19973
2025-02-19 18:02:27 +00:00
Jeff Young
857d4f3803 Cleanup. 2025-02-03 11:54:57 +00:00
John Beard
636c6c4efb Eeschema/pcbnew: fix pasted image saving
The m_imageData buffer in the BITMAP_BASE is an
internal implementation - the public API to persist the
data to a stream appears to be SaveImageData - so use that,
which hides the implementation (and generates the image data
"live" when needed).

Remove the public access to the m_imageData buffer as it isn't
needed for public use, and also is misleading.

Also break out the formatting of the data into KICAD_FORMAT,
as it's currently replicated in eeschema/pcb/pagelayout
formatting code.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19772
2025-01-31 23:01:07 +08:00
Jon Evans
54e8233b36 Don't scan for API plugins if server is disabled 2025-01-10 21:46:51 -05:00