Primary increment is the right most bit, secondary is the next
rightmost. So you can increment 'A1' to 'A2' or 'B1' with
Shift-Alt-Scroll and Ctrl-Alt-Scroll respectively.
Implemented as handling un-consumed scroll events that the
WX_VIEW_CONTROLS doesn't want because it has too many mods
set. Then dispatch these as TA_MOUSE_WHEEL events.
The default action from the selection tools is to run the
'increment' ACTION, which is implemented differently in the
various tools: eeschema can increment labels, symedit
does pin names and numbers, and fpedit does pad numbers.
These are context sensitive actions that increment "something"
about the selected item.
A generic 'increment' action can be produced, e.g. by other tools
or UI events, which has in increment step (positive or negative)
and an 'index' which determines what about the item should be
incremented - it's up to the increment action handler to decide
what that means.
And then add a primary and secondary inc/decrement action,
which allows to bind hotkeys to each.
Bind these to:
* Sym edit: increment pin names/number
increment text items
* Sch edit: increment lables and text
* FP/PCB: increment pin numbers
increment text items
The logic for this was duplicated, in two very different forms,
between the SCH_PIN bounding box function and the
SCH_PAINTER draw function.
And the SCH_PIN one was slightly wrong, as it didn't take into
account the PIN_TEXT_MARGIN, or the electrical types.
Provide a way for clients of the PIN_LAYOUT_CACHE to access
the name and number boxes.
The bounding box calculations of SCH_PINs are pretty complicated.
There is already caching of the name and number texts, but the
SCH_PAINTER (for example) has to repeat this work and sometimes
slightly diverges. For example, dangling indicators and alt
icons are painted, but not included in the bbox.
This commit introduces a more encapsulated 'layout cache' object which will
take care of caching the current extents, but also providing layout
geometry to SCH_PAINTER (and other interested code, like hit testers
on a given field) witohut requiring recomputation or reimplementation.
The extents calculations use exclusively the public API, so it's nice
and easy to split it out.
In this commit, nothing is functionally changed - the name and number
are still cached, and everything else is computed in the exact same way.
This is the groundwork for fixing this issue:
Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18894
Edge cases can happen where point + clearance is larger than the bbox.
This can cause the zOrder min and max to get switched as max get a high
bit and is negative. Clamping to limit the input values and using
uint32 for the output solves the corner case
When zone kisses happen from different polygons, we need to be careful
not to use the different polygons for ear comparisons or prev/next
pointers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18654
Fix assert ./src/generic/grid.cpp(5216): assert "idx >= 0 && idx < m_numRows" failed in GetRowPos(): invalid row index happening when selecting >= 3 row starting from the bottom last row. Even if not all row are selected.
This happen because wxGrid::DeleteRows will try to update the selected row between each call.
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
- Moves functionality to FOOTPRINT class from BOARD_ITEM
- Renames DRC property from ComponentClass to Component_Class
- Adds DRC checks QA for A.Component_Class and a.hasComponentClass('x')
For these texts, and when the view was "flip board view" option, these text
positions were incorrectly calculated for texts having a text rotation not 0.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18980
Previously, it always used the top left item's position.
This is inconvenient for lots of reasons in the symbol editor,
for example when moving a line, it will warp your mouse to
the other end if you try to move from the end, not the start
(you don't know which is which!). And if you're moving something
like a whole number of grid spaces, like a rectangle, it's
impossible to place it other than the start position on the grid.
Add SCH_PIN to the get anchor position function, and use the
normal GRID_HELPER logic to detect a grab point. This still
rejects graphics if connectables are selected to preserve
on grid connections.
The code in the area mentioned https://gitlab.com/kicad/code/kicad/-/issues/11151
but I'm pretty sure this only makes that better.
This class had m_ShowPinsElectricalType and m_ShowPinElectricalTypes.
Nearly everything used the former, only one callsite used the latter,
which would never have been changed.
When two arcs only barely overlapped, we cannot predict the actual point
ends as they exist in the error margins. Since arc tracks have
different radii by definition, rounding errors in calculating the
overlap angle led to some mistaken identification of parallel segments.
This adds an advanced config flag to set the preferred cutoff point
(currently 0.001°) for whether two arcs actually overlap in shared angle
space
Previously, when the search panel was hidden, the focused search control
did not lose focus, causing an inability to focus on any items in the
parent window when using shortcut keys. This forces correct focus back to the edit window
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12613