Removing the item from the board will also remove it
from any parent group, which then wasn't getting
restored. This makes it more clear that we need to
remove and then re-add.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18017
This prevents crashes when trying to re-evaluate
during destruction, etc. and is a cleaner solution
than trying to keep a flag updated.
It should also be a performance win for very large
documents.
Also implements proper threadlocking for the cache.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17950
Library watches only need a single directory or immediate children. The
project watcher should have a sensible limit to the total number of
files it tries to track.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15717
The DRC annular ring width test failed to take into account that a pad
could be contained inside another pad having the same number (thermal
vias for example) which changes the effective annular width of the pad
contained within another pad. A test was added to calculate the effective
annular ring width in this case.
Added some PNS log viewer helper and test code to the PNS playground QA
utility for testing the effective pad annular width code.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17485
Placing a limit on the number of values that a field is allowed to hold
makes it blank when we set more than this number. There's not a good
reason to limit the number of digits we allow at the field level (we
round to 4 decimal points in the backend)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17473
The default hotkey is Ctrl+L, as this is not bound by
default in the FP or symbol editor, and it is the hotkey
that is used to focus the address bar in web browsers,
which is a similar kind of action.
This splits the tool into two separate tools: by center and
by even gaps. Previously, this was automatically decided, based on
if the items could have any gaps between them. This was unintuitive
as it would appear to arrange by centre point sometimes but not others.
When items aren't all the same width, the results can then be very
different, based only on the starting positions.
The new behaviour is to have a dedicated tool for each, which echos
how graphical programs like Inkscape manage this.
The by-gaps method is then extended to work for overlapping items
(when items overlap, the overlaps are made equal). The logic is
centralised in kimath/geometry, and some QA is added. This should
make it easier to extend to eeschema, for example.
This also (attempts to) address some rounding issues which could
cause minor, but compounding, errors to build up along the list
of items.
Also, fix bugs in the collection filtering - previously items
like markers were filtered out only after the selection size
was used to compute the gaps between items.
When editing the board, footprint fields _look_ like text items, so copy
and paste of these items should logically result in a text item, not a
footprint copy.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17937
(And we already filter all mandatory fields in
pasteFootprintItemsToFootprintEditor() anyway.)
Also, don't nuke a footprint which contains only fields
during a paste.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17937
Circles only use one dimension and we tend to ignore the other in our UI
but it is kept and reflects the previous second dimensional value. When
checking DRC, we should only be concerned with the single value used
unless the pad has two dimensions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17944
Zoom-to-selection should only show the elements that we can see, so
avoiding hidden fields in footprints keeps the zoom window appropriately
sized
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15245
We used to have special cases to keep fields from bloating
a footprint's bounding box or being used for hit-testing.
However, now that we can distinguish PCB_FIELD_T from
PCB_TEXT_T, we should not apply these special cases to
PCB_TEXT_T. Text in footprints should act like graphics.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17854
* Do not handle tab key event when committing property changes so the
property grid tab navigation works correctly.
* Do not call commit property changes on tab key when no changes are
pending.
* Skip event handling in the base object value change and changing event
handlers in case they do not get overloaded in derived objects.
* Do not force focus to canvas on property change so arrow and tab key
grid navigation work properly. Forcing the user to click the property
grid control to edit a single property doesn't make sense.
* Pass properties panel show event up the event stack.
* Do not set focus to canvas in tool dispatcher if it already has the
focus.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16957
- Changes BOX2 size to extended coordinates.
- Adds BOX2ISafe to construct a BOX2I that will fit in int32.
- Adds more checks.
- Safer computations.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17670
If the whole line shifts, we may have no points of the old tail in the
new line. In this case, we may not only not find the split point but we
may also have fewer points in the new line than were in the old head.
Clamping to the maximum potential point count prevents creating invalid
lines
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16591
When using subsheets with nets that end in the same netname, it can be
confusing in pcbnew to know which net you are dealing with. In these
cases, we show the full netname including path to assist when routing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16187
This was originally added to facilitate
https://bugs.launchpad.net/kicad/+bug/1777688 but the concern there was
that the layer kept changing when stopping on a via. We currently have
double-click as the force-finish option and the layer reverts to the
original layer on which you were routing. This should handle the
operation concern while still preserving shift as the modifier for grid
options
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15828
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
- Component name ref comes before pin ref
- OtherSideView is at the end of the package
- BOM defines the dictionary so we need all items in the BOM even if
marked "Exlude from BOM"
- Fix unique REFDES indicator to increment number rather than appending
additional numbers
Don't try to do too many things at once. Separate
out fooptrint-children handling, visibility-handling,
and footprintEditor vs boardEditor differences.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17562
The schematic net names are fully unique but if we have multiple pads
that are mapped to a NC pin, they need to have unique net names so that
they do not get connected to each other in the ratsnest. This breaks
the schematic parity check as we have modified the netname for some
pads. To work around this, we first maintain the zero-th net without
suffix and then add an additional check in DRC to ensure that we allow
unconnected nets as long as the share a common prefix with the schematic
netname.
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
C++20 added new reverse and rewritten candidates. This can confuse the compiler because it'll test both A==B and B==A for overloads.
Because we were defining parent class equality overloads, A==B and B==A was considered ambigious due to both being compatible in casting.
So we needed to add explicit child class equality operator overloads
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
The router needs to elimitate duplicate points but keep colinear
segments. This re-creates the partial routine from the old Simplify()
function
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17582
Knockout text should only prevent filling directly around the text
itself, not the larger anti-text fill around it. This prevents minimum
width provisions from kicking in unneccesarily
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17665
Fixes issue where if the net inspector was open when a board was
loaded, the track data would not be updated until a board edit
action triggered an update.
Required for net inspector otherwise composite operations (such
as undo / redo, and length tuning) can result in multiple add /
remove events firing which results in inconsistent length state.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17527
(for 9.0)
Also handle 0-width columns coming in from settings. GTK seems to have
an issue where these columns are impossible to resize even if they are
made visible.
The dummy track in the merge colinear segments is used to overwrite the
original segment with the changes at the end, so the group must be
removed before leaving the function, and can't be removed at creation.
Fixes KICAD-74M
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
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.
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
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
Also fixes some bugs with property exposure that (along with
other things) allowed you to put table cells on a different
layer than their parent table.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17438
Pcbnew can hang for a long time when undoing operations involving
large numbers of board items. This provides an interim workaround
(and replicated the behaviour of the search panel) by only
computing track statistics updates incrementally if the inspector
is displayed.
Partially fixes https://gitlab.com/kicad/code/kicad/-/issues/17561
(if net inspector is not shown)
This behavior is generally undesirable and was only needed
because of past limitations. Now we only split a track
when the user places a via directly on top of it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16456
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.
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
- Includes GTK crash fix from a5ef4f1b
- Additionally removes an unneccesary re-sort when rebuilding columns
- Correctly saves column state when using pcbnew standalone
Introduces some updates to the inspector, and a number of bug fixes:
- Correctly handles changes in board stackup
- Correctly handles unit change events
- Correctly handles language change events
- All layout / panel settings are stored to the project settings
- Retains ability to create net report
- Simple filter searches on net name and net class name (stored in settings)
- Allows hide / show of columns (stored in settings)
- Grouping by netclass (stored in settings)
- Optional filtering by net name (stored in settings)
- Optional filtering by net class (stored in settings)
- Custom grouping by net name match
If a separate viewer frame is selected, the footprint chooser always shows
the footprint and the 3D shape is shown in a 3D viewer frame if the 3D view
is enabled.