The courtyards are referenced by multiple calls and will be rebuilt on
command. If this happens during zone fill (because the board timestamp
has incremented since the start) multiple threads may generate the cache
at the same time, leaving one with an invalid pointer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17791
(cherry picked from commit df5dd15c6f)
Ratsnest may have connections from a zone to two different items. This
should be avoided as we never want to draw the ratsnest line with the
same element as start and finish
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17763
(cherry picked from commit 8760519a87)
In the file format, the 'mirror' tag is optional (not written unless on)
so we cannot default the new text to 'mirror' on just because the
footprint is on the back layer as it won't be turned off by the
footprint loader.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17546
(cherry picked from commit d0fe2e06aa)
The clearance epsilon should not be used to limit which force elements
we return in the query. Otherwise, we can drag elements into a
DRC-violating space
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16293
(cherry picked from commit 5e850911c5)
Most of our pointers will share the top 32 or more bits of their pointer
addresses, making cache collisions highly likely. This uses a hash
combiner to mix the bits more effectively
(cherry picked from commit e4756c811e)
If there is a small hole (smaller than the conn width), we can loop
around in a circle checking all points and not move past the mimimum
distance.
To avoid this, if we detect a loop, we exit the substantial checker.
This should return with true because a large hole will return true and
we are only checking to see if there is a minimum amount of copper
between two open areas
(cherry picked from commit c841d0df6d)
We can't assume that the ignored connection exists when trying to set
the junction size. We use int_max for the default instead of 0 so that
later, we don't try to create a minor track with 0 width in loadNets()
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17523
(cherry picked from commit 00d108498f)
The clearance between two zones could be rather slow. This was in part
to trying to do triangle-triangle collisions between zones when we only
need outline collision and in part to the shape_line_chain collision
routine. The shape_line_chain collisions don't need to recreate
segments on each iteration and should instead create them once and using
this to check all collisions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17327
(cherry picked from commit 3cc1617f5a)
Between schematic and pcb editors, we want the following actions:
- Single click on ERC/DRC item should show the item in the ERC/DRC
window. But if the window is not visible, it should only update the
status bar
- Double click on ERC/DRC item should show and raid the ERC/DRC window
as well as select the line item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17383
(cherry picked from commit 0f57d76ecd)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17527
This is required as during an undo / redo operation, rebuilding
the previous selection can result in a group / generator being
selected as well as all of their contained items. This prunes
the contained items to remove the possibility of a double-delete.
(cherry picked from commit 6c73f1feef28925bf26fcc3669cb6333aad5f1d3)
The behavior of the measure tool is influenced by the
horizontal/vertical/45-degree mode, but the context menu of the measure
tool lacks an option to toggle this mode. In contrast, the drawing
tools are also affected by this mode, and their context menu has the
item to toggle this mode.
(cherry picked from commit 806daecf85)
Unfortunately the KiCad library I/O does not unescape file names so do not
escape them in the Eagle board plugin.
(cherry picked from commit cf97432833)
This was a crude hack that appends the library URN ordinal to the name of
the footprint so that it can be correctly looked up by the "element" node.
The Eagle XML DTD does not make it clear how the URN "ASSET_ID" and
"VERSION" are used to look up the appropriate "ASSET_TYPE" so this is a
best guess and seems to work correctly.
The inferred edge clearance dialog had to be disabled when importing third
party boards because on GTK (and possibly other platforms) the dialog would
completely hang KiCad preventing the imported board and possible schematic
from being saved.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12897
(cherry picked from commit 34ec57958d)