Due do latest changes, a local copy of m_DisplayOptions was used instead of m_DisplayOptions itself.
But saving config use references to save params, so a non existing reference was used.
The pointer passing for display options is deprecated. This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.
In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
3 layers shown (but not selectable) in layer manager are removed from layer box
(inner_layers is a pseudo layer, Edge_Cuts and Margin are not yet managed in Fp)
Also use "AssemblyDrawing" attribute for fabrication layers in Pcbnew (actually assembly layers)
This is due some changes in recent Gerber file format.
We want to avoid selecting items that are disabled in the item list.
Our standard method is in the GetViewLOD() that performs both size and
visibility. This extends the check to module text and via.
Fixes: lp:1851133
* https://bugs.launchpad.net/kicad/+bug/1851133
Default out-of-the-box is no hotkey. Removed all the preference stuff.
Note that the new implementation is a little different: the old one only
operated on a selection with a single item where the new one operates on
all selected items. So if you want the whole track do a 'U' before the 'W'
(or whatever you have Change Track Width assigned to).
Fixes: lp:1844023
* https://bugs.launchpad.net/kicad/+bug/1844023
The python footprint wizard can modify other parameters than the one that was changed by user.
So the parameter grid list must be updated after every parameter change.
Fixes: lp:1846404
https://bugs.launchpad.net/kicad/+bug/1846404
In Python3, all division operators promote integers to floats. We need
to downcast back to integer for the polygon vertices.
There was also an unhandled overflow in the QR generation that allowed
more than 512 bits to be loaded. This overflows the type of QR we
generate, so this truncates the input string to 62 bytes ( leaving 12
bits for the checksum )
Fixes: lp:1850223
* https://bugs.launchpad.net/kicad/+bug/1850223
This adjusts the fix for 1813038 to focus on the duplicate ghost,
preventing the need to unselect/reselect in every cycle. This improves
large move speeds substantially
This adds the pad to die parameter from each pad to the total line
length of the tuned line for comparison with desired.
Fixes: lp:1711541
* https://bugs.launchpad.net/kicad/+bug/1711541
Right click is a pointing operation combined with a request for the
context menu. We need to highlight the user's intended object when they
have moved their mouse to a new element instead of showing the context
menu for the selected object.
However, in cases where the selection is difficult to make, it is
sometimes helpful to select the item first, then right-click. In these
cases, we keep the selection where the mouse remains inside the selected
object's bounding box.
We have forbidden lists maintained in 3 separate locations. This causes
a bit of confusion as to which is correct.
This makes the list uniform but remains to place the character set in a
single location.
The previous fix for optimizer breakout length calculation was providing
better scores to longer traces rather than longer breakouts as intended.
This limits the length scoring to breakout only.
The oval clearance adds an edge on the 0-length side of a circular oval.
This is not needed and can affect the fill algorithm. Instead, we treat
round ovals as circles for pad polygons
Fixes: lp:1849846
* https://bugs.launchpad.net/kicad/+bug/1849846
(cherry picked from commit 57f0f88552)
The constrained draw was constraining the polygon size to fit the
existing points rather than extending the existing points to fit the
user's intent.
This adds a 90° double-joint for the completion polygon that allows the
user to complete common constrained polygons visually based on the
preview with a double-click to finish.
BLOCK elements in DXF are re-usable bits that are useful when editing
the file but should not be shown when importing the model. This skips
all references except those that exist in the default "*Model_Space".
This block is required in each DXF file and cannot be renamed.
Fixes: lp:1790821
* https://bugs.launchpad.net/kicad/+bug/1790821
Flipped footprint pads may report their "primary" layer as not the front
layer in high contrast. We need to check whether the board item for
snaps is visible on the active layers.
Fixes: lp:1847877
* https://bugs.launchpad.net/kicad/+bug/1847877
In ZONE_CONTAINER( ZONE_CONTAINER& aOther ), the net info was set before zone type and layer were set.
So the net info was always set to ORPHAN net, instead of set to aOther net info.
Especially, it broke undo/redo function.
Fixes: lp:1840727
https://bugs.launchpad.net/kicad/+bug/1840727
The fracture routine introduces degenerate points that are healed by the
Clipper Polygon simplify command. This is normally fine but in the case
of hatched areas, there are thousands of degenerate points, which is
very slow in Clipper. Healing the degenerate points first before
simplifying and fracturing is much faster.
Fixes: lp:1847764
* https://bugs.launchpad.net/kicad/+bug/1847764
This margin is mandatory to avoid incorrect polygons in Gerber files:
due to the fact Gerber units can be 10 nm (and Gerbview internal unit is also 10nm), valid polygons
can be converted to non valid (self intersecting for instance) by coordinates truncation.
This is a known problem in Gerber files (not specific to Gerber format)
Fixes: lp:1847737
https://bugs.launchpad.net/kicad/+bug/1847737
The router items may not yet have a board item parent. In this case,
the reference to the parent needs to be guarded before dereferencing.
Fixes: lp:1847717
* https://bugs.launchpad.net/kicad/+bug/1847717
Therefore, for some footprints, the right footprint was not associated to the component.
The hash calculation was using a XOR to combine 2 sub hash values.
This is not a strong way to combine these hash values.
They are now added. Looks better to identify similar and different footprints.
Fixes: lp:1847575
https://bugs.launchpad.net/kicad/+bug/1847575
Items and layers that are hidden in the view should not be used as snap
points. This happens in multiple locations:
1) Grid Helper for normal tools
2) TOOL_BASE::snapToItem for router
Resolves KiPro Issue #116
Fixes: lp:1833128
* https://bugs.launchpad.net/kicad/+bug/1833128
Unlike schematic symbols, the value field and the footprint name are 2 different fields.
So coupling these fields in the DIALOG_FOOTPRINT_FP_EDITOR dialog created serious issues.
Fixes: lp:1846533
https://bugs.launchpad.net/kicad/+bug/1846533
Calling Init() in an action routine will reset the router
settings to the state they were in when first starting pcbnew.
The Init() function is automatically called when the tool is created.
Fixes: lp:1843810
* https://bugs.launchpad.net/kicad/+bug/1843810
This function calls Pgm(), but when running from a script (not from kicad) Pgm() uses a nullptr reference.
The nullptr reference is now tested in ComputeBoundingBox()
* Fix wildcard display in the file selector dialog (on GTK
it would show the regex to the user)
* Move the file extension comparison into a common function
Before, if the tools were activated from the context menu,
they would start drawing where the menu item was selected
instead of where the menu was opened.
* Make the events generated by the selection of context menu items
have the position where the menu was opened
* Ensure that TC_COMMAND type events have their position set to
be the cursor position where the event originated
On complex boards, the view holds a very large vector of all objects.
The dtor will remove each one, searching for the pointer before
removing. When removing all items, this process is not needed, so we
clear the view when exiting. This also prevents lock-up when closing
the full application as KiCad waits for the dtor to finish
(non-interactively). This will cause Windows to crash and Linux to
offer an option for terminating the non-responsive application.
Fixes: lp:1843092
* https://bugs.launchpad.net/kicad/+bug/1843092
the old way was not compatible with the current management if board item lists.
The crash was probably due to double deletions.
Note also the management of undo command in pcbnew_action_plugins needs serious optimization.
Fixes: lp:1844880
https://bugs.launchpad.net/kicad/+bug/1844880
The parenthesis depth is 2 when the polygon isn't closed. This
shouldn't happen but we have the fall-through to handle odd cases
Fixes: lp:1844872
* https://bugs.launchpad.net/kicad/+bug/1844872
(cherry picked from commit d862cdaa72)
Pads may include offsets that allow the user to shift the connection
point of the pad. This is captured by the pad m_Pos but not by
ShapePos(). When testing connectivity, we need to get the offset
position.
With pads, we should check available anchor points for each connection,
increasing probability of finding connection to match fill algorithm
Fixes: lp:1844661
* https://bugs.launchpad.net/kicad/+bug/1844661
The angle rotation was always negated. But this is incorrect:
The angle rotation must be negated when flipping around X axis
The angle rotation must be 180 - initial rotation when flipping around Y axis
This bug can break position files and footprint updates,
especially when mixing flipping around Y axis and flipping around X axis.
This is the behavior of previous 5.1 version.
Using the bounding box has advantages, but unfortunately in many cases the footprint position is moved.
If a lot of flip commands are made on the same footprint, it is moved far from its initial position.
This happens with wxWidgets 3.0.4 on Windows and is a side effect of a call to Layout().
The fix just calls Layout() only when needed.
Fixes: lp:1843594
https://bugs.launchpad.net/kicad/+bug/1843594
Eagle includes the width of the polygon line when generating polygon pad
sizes where KiCad does not. This simple fix inflates polygon pads half
of the Eagle polygon line width.
Fixes lp:1833687
https://bugs.launchpad.net/kicad/+bug/1833687
panel_board_stackup.cpp: material selection:
replace wxChoice by a better widget (wxTextCtrl+wxButton) to call the dielectric manager dialog
Move dielectric material class to a specific file
Doing so in the internals keeps users from being able to swap layer
names as the dialog does each layer name change individually.
Fixes: lp:1842665
* https://bugs.launchpad.net/kicad/+bug/1842665
Use the HTML_MESSAGE_BOX window to present the warning messages rather
than wxMessageBox which would overflow the display when there were a lot
of graphic items that could not be parsed.
Fixes lp:1839565
https://bugs.launchpad.net/kicad/+bug/1839565
This makes the pcbnew multiline text editor natively accept tabs in the
same manner as eeschema and extracts key handling routines to the shim
to allow undo/redo.
Also allows Ctrl-Y under Linux in addition to other platforms. While
not as popular as Ctrl-Shift-Z, it is utilized for Redo in some contexts
Also wrap orientation instead of verifying it. This allows valid angles
that are larger/smaller than the ±180 limit.
Fixes: lp:1842654
* https://bugs.launchpad.net/kicad/+bug/1842654
The INT_MAX limit for most elements makes sense only for single-segment,
straight line elements. For elements that accumulate lengths, we should
utilize the long long int (64 bits) to allow for greater lengths.
Fixes: lp:1842367
* https://bugs.launchpad.net/kicad/+bug/1842367
While we're re-using the Text Properties dialog, it really covers all
properties for a Dimension, so it needs to be more clear what's text
and what's not. This changelist uses the Tooltips to store the more
explicit labels so they can still be edited in FormBuilder.