Savers now serialize to in-memory HISTORY_FILE_DATA on the UI thread,
then Prettify + file writes + git stage/diff/commit run on a background
thread via GetKiCadThreadPool(). An atomic skip-if-busy flag prevents
overlapping saves; WaitForPendingSave() ensures clean shutdown.
Extracted FormatBoardToFormatter and FormatSchematicToFormatter so
SaveToHistory can serialize without touching disk. PROJECT savers use
sourcePath for file-copy semantics since project files are small.
When importing an Altium project, the handler only recognized
PcbDoc files. Projects that reference Circuit Studio, Circuit
Maker, or SolidWorks PCB files (CSPcbDoc, CMPcbDoc, SWPcbDoc)
had their board silently skipped. Map each extension to its
correct PCB_IO plugin type so the right parser is used.
Extract duplicated helpers from remote provider files into shared
utilities. Split sendRpcMessage into purpose-specific functions.
Implement standard nonce-based exchange for re-auth. Provide
additional models for more efficient model/symbol/fp/etc using
external URLs. This allows us to better handle connection errors,
retries and large data packets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23381
EmptyTreePrj() sets the KIGIT_COMMON cancel flag to true during
project close to stop in-flight git operations. However, when
ReCreateTreePrj() opens a new git repository for the next project,
the cancel flag was never reset to false. Since the KIGIT_COMMON
object persists across project switches (owned by PROJECT_TREE),
all git operations (status icons, sync, fetch) were permanently
disabled after the first project close.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23344
The BOM revision in IPC-2581 export was hardcoded to "1.0"
instead of reflecting the actual design revision.
The project file stores two separate fields: bomRev for
explicit user overrides set in the PCBnew export dialog or
via --bom-rev on the CLI, and schRevision for the value
auto-propagated from eeschema.
Load both v1 and v2 JSON schemas at startup and select the
validator based on the repository's schema_version field. Send
an Accept header with the v2 vendor media type so the server
can respond with the appropriate schema version.
Defuse the v1 schema by removing forward-looking type enum
values and opening the category field to free strings. Add a
v2 schema that uses pattern-validated open strings for type,
category, and license.
Skip packages with unrecognized types in the dialog rather
than displaying broken entries.
When the "directory not empty" dialog appeared during non-KiCad
project import, clicking No fell through to CreateNewProject and
LoadProject on the non-empty directory. This caused the main
thread to hang in LOCAL_HISTORY::Init as libgit2 tried to index
all files in the source directory.
The dialog now has Yes/No/Cancel buttons. Cancel and mkdir
failures loop back to directory selection instead of aborting
or falling through. No continues with the non-empty directory.
The CLI BOM export requires generated field names like ${QUANTITY}
and ${DNP} to be wrapped in ${} delimiters. When users pass these
on the command line inside double quotes, the shell expands ${VAR}
to an empty string, silently dropping the field from the output.
Normalize field names in the job handler so that bare tokens like
QUANTITY, DNP, ITEM_NUMBER, EXCLUDE_FROM_BOM, EXCLUDE_FROM_BOARD,
and EXCLUDE_FROM_SIM are accepted alongside the canonical ${} form.
Update the default --fields value and help text to use the shell-safe
bare form.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22613
Replace hand-rolled --variant argument registration and parsing
in 9 PCB export commands with the existing addVariantsArg()
infrastructure from CLI::COMMAND. This removes redundant
ARG_VARIANT defines that shadowed the one in command.h, and
replaces manual From_UTF8 parsing with m_argVariantNames
populated automatically by COMMAND::Perform().
The variant system correctly affected 3D visualization but all CLI
export paths (STEP, SVG, PDF, DXF, PS, Gerber, IPC-2581, ODB++) lost
the in-memory variant state because kicad-cli loads the board fresh
from disk.
Add m_variant field to JOB_EXPORT_PCB_3D, JOB_EXPORT_PCB_IPC2581, and
JOB_EXPORT_PCB_ODB. Add --variant CLI argument to all PCB plot, 3D,
IPC-2581, and ODB++ export commands. Each job handler now calls
SetCurrentVariant() on the board after loading, so variant-aware DNP
and BOM filtering works correctly during export.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23159
Remove stale m_ShowRepairSchematic member from
advanced_config.h left behind when RepairSchematic() was
retired. Remove unnecessary const_cast in wxExecute call
in jobs_runner.cpp. Fix stray semicolon after return in
pcb_barcode.cpp and use >= ZINT_ERROR instead of truthiness
for the ZBarcode_Buffer_Vector return check.
The Execute Command job in jobsets was calling wxExecute() with a plain
string, which on Unix calls execvp() directly without shell interpretation.
This meant that shell features like glob expansion (*.txt), pipes (|),
and other shell constructs did not work when invoking binaries directly.
Shell scripts worked because the shebang invoked a shell that handled
expansion.
Fix by using the array form of wxExecute to invoke the platform shell
(/bin/sh -c on Unix, cmd.exe /c on Windows), passing the entire command
as a single argument. This avoids quoting issues with shell metacharacters
while ensuring all shell features work consistently.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21708
The standalone `pcb export gerber` command was deprecated in
V9 in favor of `pcb export gerbers`. The `--plot-invisible-text`
argument was deprecated across pcb export dxf, gerbers, pdf,
and svg when the underlying action was removed.
Per the one-cycle deprecation policy, both are now removed for
V10. The gerber base class is preserved since gerbers inherits
from it. Shell completions for bash and zsh are updated, and the
CLI test now uses the gerbers directory-output interface.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23056
Break the most expensive header include chains that contaminate the
largest number of translation units
New lightweight headers for extractdded types:
font_metrics.h, mouse_drag_action.h, board_project_settings_params.h,
common_settings_internals.h, wx_infobar_message_type.h,
zone_layer_properties_grid.h
The update check runs on the thread pool and captures a raw pointer to the
KICAD_MANAGER_FRAME for CallAfter. If the update check completes during
frame destruction, the CallAfter targets a partially-destroyed window,
causing a segfault in wxWindowBase::RemoveEventHandler via wxAuiNotebook
destruction. At least, that is the theory...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22593
GetCurrentFileName() was defined inline in kicad_manager_frame.h,
calling GetProjectFileName() which is only defined in the kicad
module. When GCC 15 emits the out-of-line vtable entry into
libcommon.a, programs like bitmap2component that link libcommon
without the kicad module fail with an undefined reference. Moving
the definition to the .cpp file keeps the symbol reference within
the kicad module where it can be resolved.
Add a schematic importer for gEDA and Lepton EDA .sch files.
The importer parses the full gEDA file format including
components, nets, buses, attributes, text, graphical
primitives, and paths with bezier curves.
A builtin symbol library ships 39 standard gEDA symbols so
import works without a gEDA installation. Symbol resolution
follows an 11-step search chain matching native gEDA/Lepton
conventions across environment variables, system paths, XDG
directories, RC files, config files, and project directories.
Last-found-wins priority matches native gEDA behavior.
RC file parsing handles gafrc and gschemrc component-library
directives. Lepton-EDA INI configs (lepton.conf, geda.conf)
are also parsed.
Project import reads gEDA .prj files and discovers schematics
and PCBs automatically.
File format knowledge and embedded symbol definitions derived
from gEDA/gaf (C) 1998-2010 Ales Hvezda, 1998-2016 gEDA
Contributors, and Lepton EDA (C) 2017-2024 Lepton EDA
Contributors. Both licensed under GNU GPL v2 or later.
Add complete import support for PADS ASCII (.asc) files, covering both
PCB layouts and schematics. The importer handles board outlines, copper
pours, routing with via inference, footprint decals, net assignment,
design rules, and component placement for PCB files. For schematics, it
supports symbol building from CAEDECAL definitions, multi-gate and
multi-variant parts, power symbols, wire routing, net labeling, arc
graphics, title blocks, and hierarchical sheet connectivity.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19944
When importing Altium projects, the MAIL_ADD_LOCAL_LIB handler stored
absolute paths in the sym-lib-table for native Altium library files
(.SchLib). This caused broken library references when the project was
moved to a different location.
Now library files outside the project directory are copied into it
during import, and the sym-lib-table URI uses ${KIPRJMOD}/ prefix
for project-relative paths. This matches the behavior of the Eagle,
CADSTAR, and EasyEDA Pro importers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22941
This allows the local history pane to be resized upwards.
Using -1 *should* mean "don't set", but it evidently has
some side-effects, after which the splitter bar will only
move down and not up.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22959
Duplicating a template copies files that trigger OnFileSystemEvent,
which starts a 500ms refresh timer. The subsequent DisplayInfoMessage
runs a modal event loop during which the timer fires, calling
RefreshTemplateList which destroys all TEMPLATE_WIDGETs including the
one whose onDuplicateTemplate is still on the call stack. When the
modal dialog closes, any further member access is undefined behavior.
Defer both the info message and the refresh via CallAfter so they
execute after the event handler has returned and the call stack is
clean.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22931
Configuration entries are now sorted alphabetically and a search
control filters the list by key name as you type. Double-clicking
a boolean value toggles it instead of opening a text editor.