Flip Board View did not work correctly when it was added to a
custom toolbar. The board flip worked from the view menu or
appearance panel.
This change stores the board flip state in PCB_DISPLAY_OPTIONS
and applies it through SetDisplayOptions(), the same way other
display toggles are handled. The toolbar, menu, and appearance
panel now use the same state, so Flip Board View works correctly
from custom toolbars.
* add VARIANT and VARIANT_DESC to the list of known vars in the drawing
sheet editor.
* cache variant and variant description in respective objects.
* expand the respective text variables when building the drawing sheet.
* keep the cached variant and its description up-to-date when selecting
a variant in the GUI.
* pass variant and its description to the plotters.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23430
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.
There are some headers which don't need to include pad.h (which brings
padstack.h) - they just need forward defines.
While pad.h is not an especially heavy include on the scale of things,
footprint is quite heavy. And both reduce inclusion load and
reduce the number of files needlessly sensitive to changes in headers.
This lightens the load when including forwards for PCB_TRACK and
friends as we don't need all the transitive includes. Sometimes
you just need the enums - many users just wanted VIATYPE, or
just needed a forward.
And reduces transitive code churn when something is changed in the
header - this reduces the files affected by a change in
pcb_track.h from nearly 400 to under 200.
Move onUpdateUI from public to private in EDA_BASE_FRAME since
it is an internal event handler bound via Bind(), not part of
the public API.
Capture the empty-check result before erasing rows in
library_manager.cpp to avoid using invalidated iterators from
the subrange returned by std::ranges::remove_if.
Add null guards to the netHighlightCond toolbar condition
lambda in PCB_EDIT_FRAME to prevent null dereference during
shutdown, matching the pattern used by other toolbar
conditions fixed in f962de966b.
Guard GetPcbNewSettings() calls in setupUIConditions() lambdas
against null return. The settings manager deregisters the
PCBNEW_SETTINGS object during cleanup before wxLogGui::Flush
finishes, leaving the toolbar idle update to dereference a null
pointer.
Groups with fewer than two items serve no purpose. All
user-facing group creation paths now require at least two
items before creating a group. The Group menu action is
greyed out when fewer than two items are selected.
When items are removed from a group via RemoveFromGroup,
pruneExistingGroups, or the netlist updater, the group is
dissolved if it drops below two members. Importers are left
unchanged since they reflect external file structure.
The cross-probe flash timer periodically toggles selection visibility to
create a visual "flash" effect. When this timer fires during an active
move operation (via the coroutine's Wait() yielding to the event loop),
it calls ClearSelection/AddItemToSel which toggle view()->Hide() on items
being rendered through the selection overlay, corrupting the VIEW state.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22993
The DRC Rule Editor was not being closed during shutdown, causing it to linger briefly after the main window closed. Register a window name and close it in both doCloseWindow() and the destructor, matching how the DRC dialog is handled.
This breaks the view_item.h -> inspectable.h -> property.h chain that
pulled wx/propgrid/property.h into 150-200 TUs. The lean inspectable.h
now includes only wx/any.h, wx/string.h, wx/variant.h.
Headers using DECLARE_ENUM_TO_WXANY (board_item.h, sch_item.h) retain
their property.h include since the macro requires it.
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
Recent issue conversations are suggesting that it's no possible for
footprints to contain null fields. Rather than blindly dereferencing
field pointers in loops, check to make sure the field pointer is not
null before dereferencing.
Local history combines project backup and autosave into a single place
where arbitrary history can be stored efficiently and restored to any
point in time. Git commits are made on a debouce timer to hold
modifications, allowing the user to step backwards in time to arbitrary
points. Restoring backups does not remove the existing files and
choosing to restore an autosave point does not remove the state of the
files prior to the restore, providing additional safety.
Keeps the maximum storage size limit but removes the additional
limitations of number of backups/backups per day, etc as these are not
relevant to a CoW-based backup as unchanged files do not take up
additional space.
Tuning profiles build on the previous delay tuning work to allow
the definition of track geometries per-layer for a given tuning
profile. These can be calculated from a target impedance (with
all relevant geometry taken from the board stackup), or entered
manually.
Tuning profiles can be configured to enable time-domain tuning,
and to automatically generate track geometry DRC rules for net
classes which have an assigned tuning profile.
Adds a DRC check for net classes with a tuning profile assigned
which is not itself defined.
When moving an object in pcbnew, instead of using the constrainer to
restrict motion, we use it to build snapping guidelines that are visible
to the designer and make keeping movement on the various axes easier but
not required
Using the new wx3.3 routines to serialize the state of our AUI elements,
we store them using JSON in the preferences for each window
I have left the SavePerspective in place for now to see how legacy
(mostly *nix) builds handle this and provide a smooth transition to 3.3
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2381
Provides an update action to refresh the icon display when the user
changes the angle mode using a hotkey. Also unifies the angle modes
between schematic, pcb and library editors
This is a zero-dimensional object that can be used for snapping
and documentation of useful, but non-physical features on a
board or footprint. They do not correspond to any physical
output in exports or plots.
Points do have a "size", but this is a graphical property only
and determines how large they are drawn on the board.
They also have a layer, which allows them to be selected and
made visible according to layer filters.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/4691