687 Commits

Author SHA1 Message Date
Ian McInerney
f0a76f62b6 Cleanup PCB/fpeditor layer box handling 2025-02-28 01:57:37 +00:00
Ian McInerney
7ad1103f55 Move toolbars to a serializable storage format 2025-02-28 01:57:37 +00:00
Ian McInerney
c24dbc17bf Move toolbar setup flags into the action definition
This makes them centrally defined, and removes the need to specify them
when creating the toolbar.
2025-02-28 01:57:37 +00:00
Jeff Young
797de67c6c Apply EEschema fixes to PCBNew and Footprint Editor.
(Symbol Editor doesn't have the issue of the properties
being overwritten.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20066
2025-02-26 20:06:30 +00:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Jeff Young
97a0ec504b Search Panel hint in Find Dialogs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19722
2025-02-24 11:08:28 +00:00
Jeff Young
5edae8250d Finish eradication of visibility flag on text items.
Import/read previously-hidden symbol/footprint
text items as hidden fields.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19875
2025-02-19 23:43:52 +00:00
Jon Evans
5426bfcdcd Don't autosave future formats of project settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19910

(cherry picked from commit 7d689e0c616c8af4b056f20ce3c95c37624e3df7)
2025-02-10 19:20:56 -05:00
Jeff Young
8874f137fa Read hotkeys from disk after they change.
(Otherwise we'll write the old versions back out
when closing one app.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19612
2025-02-01 20:01:13 +00:00
Jeff Young
0d6a2f1c47 SynchronizeProperties after (potentially) changing text vars.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19658
2025-01-16 18:37:10 +00:00
Jeff Young
c52c41a1d5 Make doubly sure net inspector settings are saved.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19449
2025-01-13 19:28:08 +00:00
Seth Hillbrand
becbf82390 Keep FP Properties dialogs as quasimodal
The dialogs will launch their own quasi modal dialogs, which reparent
themselves to the TLW.  When closing, on GTK, they will focus the TLW,
leading to events being handled while the initial quasi modal dialog is
still showing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19385
2025-01-12 19:37:05 -08:00
Alex Shvartzkop
7677c71fdb Initialize some members in PCB_EDIT_FRAME. 2025-01-09 19:16:38 +05:00
Jon Evans
7ce0f55305 Don't auto-save local settings when migrating
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19540
2025-01-08 08:43:28 -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
ea12689e29 Pcbnew: also show clearance outlines in FP editor
Not having these shown makes it easy to accidentally
enable them without noticing.
2025-01-02 05:46:48 +08:00
John Beard
f7aded00c7 Pcbnew: draw clearance lines on their own GAL layers
This tidies up quite a performance hit on layer change
caused by repainting vias, pads and tracks for their
clearances.

Instead, on a layer change, just disable any old clearance
layer and enable the new one (if any).

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19404
2024-12-31 00:53:10 +08:00
Marek Roszko
659228de2d Add some closebuttons to pcbnew panes 2024-12-29 08:02:08 -05:00
Marek Roszko
d8d84f300f CHANGED: Eliminate the independent SVG plot dialog that only duplicated and half-implemented the functions of the full Plot dialog 2024-12-28 18:55:03 -05:00
Jon Evans
fb8d16439b Tie handler de-registration to window close
The handlers can't accept commands when the window
is closed, which can be (far) earlier than the actual
dtor of the frame

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19375
2024-12-26 18:26:06 -05:00
Marek Roszko
22d13546fb Some DisplayError -> DisplayErrorMessage 2024-12-20 19:28:30 -05:00
Seth Hillbrand
6d99f62c96 Prevent events from firing in the main window during load
Closing the source window while another wx loop is running can lead to
async events being processed, leaving the current stack out of scope

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19341
2024-12-20 11:32:26 -08:00
Jon Evans
523fcc039f API: Move trace macro to utils 2024-11-28 11:28:06 -05:00
Jon Evans
3129e072c4 API: Move graphics and text handling to common
Required moving API_HANDLER_COMMON out of kicommon
2024-11-28 11:28:06 -05:00
Dhineshkumar S
dc5550c875 Fix schematic setup dialog reopens instead of activating if already open
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18757
2024-11-19 21:06:40 +00:00
John Beard
2391e5ecdc Pcbnew array: allow selecting the center point interactively
This involves recasting the array tool from the slightly
eccentric ARRAY_CREATOR class into a full-blown TOOL, which
allows it to usefuly store state asd the dialog hides. This
is modelled on the POSITION_RELATIVE_TOOL strategy.

The by-radius-and-point mechanism is removed entirely,
as it's very fiddly and hard to describe in the UI,
and what you probably really want to do is get your
item onto the circle with tools like "move exact",
and then define the circle origin (now using the picker
tool)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16783
2024-10-28 22:01:14 +08: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
215533f31a Unify flip direction handling
There was a gentle mish-mash of booleans, some with
true being left/right and some up/down, and some functions that
can flip in both axes (which is never actually done, and doesn't
really make geometric sense).

Replace all this with the FLIP_DIRECTION enum class, which makes
the intention completely unambiguous.

This also then allows a small scattering of simplifications,
because everything takes the same type and you don't have to
fiddle booleans to fit.
2024-09-27 17:13:13 +01:00
John Beard
b3248095e8 Pcbnew: add bezier editing tool
Adds the initial implementation of bezier overlay
(assistant) and geometry manager. This is only
implemented in Pcbnew - the code is common, but
eeschema doesn't currently use it for any shape.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/8828
2024-09-25 21:41:32 +01:00
jean-pierre charras
f0b92b0c5d PCB_EDIT_FRAME::HardRedraw(): also refresh message panel and ratsnest. 2024-09-09 17:01:55 +02:00
Jeff Young
94f995c49e Reduce dependency on dynamic_cast.
(Especially where it is no-worky on MacOS.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17245
2024-09-04 17:24:49 +01:00
Jeff Young
3441861988 Make arrow keys respect grid overrides. 2024-08-28 19:54:23 +01:00
Tomasz Wlostowski
145f26dd1e pcbnew: fix post-rebase errors 2024-08-13 22:50:26 +02:00
Tomasz Wlostowski
689ba39581 pcbnew: register the MULTICHANNEL_TOOL in the tool manager. 2024-08-13 22:50:26 +02:00
John Beard
edf13bdfd0 Add a layer pair preset list
This will later be used for a quick switcher UI. This commit
adds the data structures, set-up UI and project file persistance.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/15227
2024-08-06 23:45:55 +08:00
Jeff Young
dab3972165 Clear fields when flag is set.
Also make sure we set aUpdated when deleting extra
text items or fields, and when updating fabrication
attributes or 3D models.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17756
2024-07-22 17:15:21 +01:00
Seth Hillbrand
77797103f7 Add ability to embed files in various elements
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures.  File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.

kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document.  Embeds are allowed in schematics, boards,
symbols and footprints.  Currently supported embeddings are Datasheets,
3D Models and drawingsheets

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

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827
2024-07-15 16:06:55 -07:00
Seth Hillbrand
e0453d9bcc Further cleanup of LSET
Remove duplicative functions.  Standardize on C++ stdlib formatting
2024-07-08 22:00:53 -07:00
Seth Hillbrand
cc850d0da0 Split out LSEQ/LSET from LAYER_ID
Separate the layer grouping classes for easier modification
2024-07-08 20:59:46 -07:00
Seth Hillbrand
293075426b Clean up some LSEQ functions
We are derived from std::vector now.  We don't need our own prima donna
increment and dereference overload as these just create bloat and
non-standard coding practices
2024-07-08 20:59:46 -07:00
Jeff Young
c549a214c9 Performance: don't alloc std::vector in critical areas.
For some history, see also aa2ad3b44c3e533cf00a5077db17fb0ee7e302eb
2024-06-21 19:07:46 +01:00
Alex Shvartzkop
62fb5697b4 Optimize redrawNetnames.
Using RTree is slower in this case.

RTree: 25 ms when moving cursor
This method: 5 ms when panning/zooming
2024-06-19 20:55:33 +03:00
Jeff Young
7fef6e8d83 Use view's RTree for redrawing netnames. 2024-06-14 00:20:37 +01:00
Jeff Young
c9ddcd618d Make sure to reset the cached viewport. 2024-06-12 23:35:06 +01:00
Alex Shvartzkop
44a33eedf4 Update only visible track segments in redrawNetnames.
RequestRefresh doesn't seem to be needed.
2024-06-13 00:28:37 +03:00
Jeff Young
0ca7a81181 Deferred redraw for netnames. 2024-06-12 17:20:20 +01:00
Jeff Young
d865bda4f2 Cache display netnames.
Also changes the redraw behaviour to not try and redraw
only when things entered the view (this didn't work
because it may be the netname that's entering the view,
not the whole track).  Instead we only process a finite
number of tracks on each idle event (in order to avoid
#12436).

Note that we don't need the timer at all anymore as the
netnames are in fixed locations on the track and never
make the track look like it's being dragged.

Also improves performance by avoiding sqrt.
2024-06-11 16:30:52 +01:00
Jeff Young
53ec5d2c19 Retain UUIDs where possible when updating footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17451
2024-06-01 13:45:15 +01:00
Jeff Young
3944d8abc9 Formatting. 2024-05-22 22:37:57 +01:00
Mike Williams
8e286d44fc Update Footprint: add checkbox for text content
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17935
2024-05-20 09:16:04 -04:00