324 Commits

Author SHA1 Message Date
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
Wayne Stambaugh
75365e8b71 Schematic hierarchical sheet improvements.
* Ensure hierarchy navigator history iterator is valid before removing
  history list entries.  This fix prevented a crash in the 8.0 branch.

* Purge consecutive duplicate hierarchy navigator history entries.
  Navigating to the same sheet path doesn't make sense.

* Don't rebuild hierarchy navigator tree twice when creating new sheet.

* Remove unused sheet property dialog commit code.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18778
2024-12-24 09:50:10 -05: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
Mike Williams
018d02eb02 design blocks: copy sheet to project dir instead of linking 2024-11-06 13:39:38 -05:00
John Beard
1a2c84eb76 Eeschema: add 'place next unit' action
This makes a new symbol with the lowest unplaced
unit number and enters the PlaceSymbol action
(but only places that one unit)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18882
2024-10-27 05:13:24 +08:00
Martin Berglund
00c1f471e4 Eeschema: Reduced LoadSymbol calls in PlaceSymbol
Check early if a symbol is not unique - before calling SchGetLibSymbol
and in SchGetLibSymbol checks the cache before calling LoadSymbol.

This speeds up opening the symbol browser significantly when having lots
of symbols in the design that needs to be polled from a database

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18826
2024-10-24 22:59:49 +00:00
Wayne Stambaugh
a6923b3de3 Cache full schematic sheet list sorted by sheet page number.
The sheet list is returned as a copy of the cached list rather than a
reference to prevent external code from changing the list.  While not as
performant, it eliminates the risk of the sheet list being altered in
ways that could break the schematic.  The sheet list should only be
updated by calling SCHEMATIC::RefreshHierarchy() when any appropriate
sheet changes are made.

Note to developers: there is something inherently different about how the
QA tests are loading and handling schematics versus the schematic editor.
Using the cached sheet list for the SCHEMATIC object will cause some QA
test to fail.  This is why SCHEMATIC::Hierarchy() has not replaced
SCHEMATIC::BuildSheetListSortedByPageNumbers() everywhere.
2024-10-09 09:58:50 -04:00
JamesJCode
d64a112971 Implement Component Classes
- Adds Component Class field to SCH_DIRECTIVE_LABEL
- Adds SCH_SYMBOLs to SCH_RULE_AREA item lists
- SCH_SYMBOLs resolve Component Class directives
- Netlist exporter / importer handles Component Class names
- Adds DRC expressions and functions
- Adds QA check for component class netlist export
2024-10-01 22:36:18 +01:00
John Beard
460e575457 Use REFERENCE_IMAGE for SCH_BITMAP
Also wire in the transform origin handling to the point editor
and the properties panel in eeschema.
2024-09-30 10:20:20 +01:00
Mike Williams
953bc2d4bd design blocks: implement properties window
Also adds support for default fields when placing design blocks as a
sheet.
2024-09-26 15:48:39 -04:00
John Beard
109675f39e Eeschema: add bezier tool
This is a little more primitive than the pcbnew tool,
in the same way that the arc tool is also more primitive
(no interactive manager).

It works just about well enough to get the curves drawn,
but all these tools could do with some interactivity
in esschema and symbol editor.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8828
2024-09-25 22:09:32 +01:00
Mike Williams
586a327e4a import sheet: fix doubled sheets when placing existing sheet file
Also fix a toolstack issue with entering sheets with the sheet tool.
2024-09-19 11:15:45 -04:00
Mike Williams
93b9607e6a sheets: respect annotation when adding existing sheet
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17807
2024-09-19 11:15:45 -04:00
Seth Hillbrand
c736904e39 Use arrow not pencil when selecting image
The arrow cursor makes better syntactic sense for placing existing items
rather than drawing as is the case for other tools

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17588
2024-09-13 16:52:18 -07:00
Mike Williams
2c99bc6c6d new feature: Schematic Design Blocks
Added to advanced config, default to off.
EnableDesignBlocks=1 in kicad_advanced to test

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2263
2024-09-05 08:35:49 -04:00
Jeff Young
535aca7a8d Remove redundant tooltips.
Also fixes grammar and capitalisation in a few tooltips.

Also standardises some terminology, such as
"Add" vs "Draw"/"Place" and "Assignment" vs "Association".

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17694
2024-08-18 17:18:07 -06:00
Tomasz Wlostowski
9963b9dd9f TOOL_INTERACTIVE: only create the context menu when we are running in GUI mode
TOOL_MENU::m_menu was unconditionally created by the TOOL_INTERACTIVE constructor, resulting in crashes if
we wanted to run the TOOLs in headless  mode, e.g. in unit tests. This commits makes
the creation of the menu object dependent on Pgm::IsGui().
2024-08-13 22:50:26 +02:00
Wayne Stambaugh
73bcaec10a Respect default schematic text size setting when creating text box.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18484
2024-08-05 14:00:19 -04:00
Jeff Young
3833922c35 Support Body Style changes in context menus.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18416
2024-07-20 20:39:45 +01:00
Jeff Young
edc7603d2a Make it clear that GetSheets() is heavy.
Also removes the side-effect that SCH_SHEET_LIST's
c'tor would sort the list (and write virtual page
numbers) anytime the starting sheet was the root.

Also, definitely don't build a SHEET_LIST (sorted or
otherwise) if you're not even going to use it.

Also don't build SCH_SHEET_LISTs on idle events.  Better
to just always have the Next Sheet button enabled (we
already beep if you click it and there's no next sheet).

Also, use a SCREEN_LIST when you can.  It's much cheaper
to create.
2024-06-06 18:00:59 +01:00
Jeff Young
44c588f122 Performance for large hierarchies: lazy eval
Don't create SCH_SHEET_LISTs until we have to, and then
only create them once.
2024-06-06 11:53:01 +01:00
Mike Williams
7679f40b2b SCH_REFERENCE: drop separate pointer to LIB_SYMBOL
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18115
2024-06-04 10:03:00 -04:00
Mike Williams
32289ffce7 schematic: fix broken undo of sheets, new and changed
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11855
2024-06-03 13:45:52 -04:00
Jon Evans
eb0708d48d Fix broken cherry-pick 2024-05-03 11:49:58 -04:00
Jon Evans
ac8bd587dc Fix deduplication of already-placed symbols
The comparison function was failing to properly
de-duplicate by LIB_ID, especially for parts
from database libraries, causing the list to grow
with the size of the design.

(cherry picked from commit 2ef18ad4ca61c62592f64c495815f127c7b3ac60)
2024-05-03 11:47:21 -04:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
James J
be8744176c Add SCH_RULE_AREA shapes to eeschema
Includes:
 - Fix GAL to draw closed polygons in eeschema
 - Add functionality to eeschema to draw arbitary polygons
 - Update polygon item previews to have customisable edge colour
 - Add new SCH_RULE_AREA class, derived from a poly SCH_SHAPE
 - Add SCH_RULE_AREA to paint and plot methods
 - Add new rule area color preference to themes
2024-04-25 14:24:46 +00:00
Ethan Chien
d058e12cb5 Fix: Unable to select other items after syncing hierarchical sheet pins
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17800
2024-04-25 10:49:07 +00:00
Wayne Stambaugh
17bcc27ff6 Fix missing instance data when reusing an already loaded schematic.
Remove duplicate sheet instance page numbering.  It's already done when
the sheet is loaded from an exiting file or an already loaded schematic.
Remove the unnecessary page update code from the drawing tool.
2024-04-18 15:47:47 -04:00
Jeff Young
d761b4f22f RIP LIB_TEXTBOX and LIB_SHAPE. 2024-04-16 16:31:16 +01:00
Jeff Young
c5ed80af52 Harmonize rotate APIs. 2024-04-06 09:34:56 +01:00