The Move command grabbed footprints from the nearest grid point rather
than the footprint anchor. This was caused by the reference point being
grid-aligned at drag start (commit 89be3fd390), which was a workaround
for fractional-nanometer positioning errors with non-page display origin.
Fix the root cause instead: AlignGrid(VECTOR2I, VECTOR2D, VECTOR2D)
relied on implicit VECTOR2D->VECTOR2I truncation to pass grid parameters
to computeNearest. For grid sizes that aren't exact in IEEE 754 double
(e.g., 0.254mm = 10 mil becomes 253999.999... instead of 254000), the
truncation produces incorrect grid sizes. Use KiROUND for the conversion
so all grid operations produce exact grid multiples.
With AlignGrid returning correct positions, the move tool no longer needs
to grid-align its reference point. Restore the anchor-based grab and the
GetMoveWarpsCursor() preference that 89be3fd390 removed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23308
Setting flyout groups (units, crosshair, line modes) now cycle to the
next option on single-click instead of requiring a long-press to open
the palette. Tool flyout groups (route track, tune, dimensions, origins)
continue to activate the displayed tool on click.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23349
When clicking flyout buttons for non-tool groups (crosshair style,
units, line modes), advance to the next option in the group instead
of re-dispatching the already-active action. Tool-type flyout groups
retain existing behavior of selecting the displayed tool.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23349
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.
On macOS, menu accelerators intercept key events before they reach focused text controls. The existing workaround in ACTION_MENU::OnMenuEvent re-creates the key event but uses the raw key code (always uppercase for letters) when converting.
Fix by checking the actual Shift/CapsLock keyboard state and converting the key code to the correct case before forwarding the synthetic wxEVT_CHAR event.
Row 53
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
When a progress dialog calls YieldFor to process events, timer events
can fire and trigger disambiguation menus. Opening a popup menu during
YieldFor creates a nested modal event loop that leaves the menu stuck
and unresponsive, potentially locking up the entire UI on platforms
where the context menu captures all input (like Xfwm).
This fix adds a guard in DispatchContextMenu to check if the event loop
is currently yielding, and if so, skip opening the context menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14489
When pressing escape soon after left clicking (within ~60ms), KiCad
was processing the escape key before the mouse button release event
due to wxWidgets event queue ordering. This caused operations to be
canceled instead of completed.
The fix adds flushPendingClicks() which checks button state via polling
when an escape key event arrives. If a button was logically pressed but
has been physically released, the click event is generated before the
escape event is processed, maintaining proper ordering.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20527
Dragging a line should only ever maintain either the line itself or the
adjacent angles. The direction of motion should always be orthogonal to
the line.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22563
Provides a global registry for context menu factories keyed by
action or group name. This allows JSON-loaded toolbar configurations
to get the same context menus as code-defined defaults.
API syntax:
config.AppendAction( ACTION ).WithContextMenu( factory );
The WithContextMenu() method registers the factory in the
global registry keyed by action name.
Context menus can also be associated with toolbar groups:
TOOLBAR_GROUP_CONFIG( name )
.AddAction( A )
.AddAction( B )
.AddContextMenu( factory )
The factory is registered globally by group name.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20713
Construction manager and snap manager keep raw pointers to board items,
so we need to clear them when switching canvases
(cherry picked from commit 3003c0c509)
We have a number of potential snap points and we would prefer to snap to
identified snap points on objects in the view over ethereal points
created by intersections
When dragging a vertex, use the 45/90 limits as guides and display the
full guidelines. When dragging a midpoint, do not use these limits.
Keep the standard converging limit
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
(We have a different "Expand Selection" command now,
and this was never a great name for showing
more choices anyway.)
Also treat tablecells as opaque when guessing
selection candidates. It's unlikely there's anything
under them and keeping to their text bounds feels
counter-intuitive.
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
The flag wxMOD_ALTGR is defined in wxWidgets as wxMOD_CONTROL|wxMOD_ALT
So AltGr key cannot used as modifier key because it is the same as
Alt key + Ctrl key that is already handled.
So the previous code did not work with modifiers Alt key, Ctrl key and Altgr key
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21696