When no default library tables are found, set the default wxFilePickerCtrl
to the users configuration path instead of the current project path to
prevent any project library tables from being used as the default.
Fixes lp:1809769
https://bugs.launchpad.net/kicad/+bug/1809769
If user hotkeys do not map all available actions, we still want the most
recent change to be the primary value. This can happen if the defaults
load a set of hotkeys that are not completely overwritten by the updated
hotkey preferences file. We assume that the most recent hotkey is what
the user want to map.
Fixes: lp:1778408
* https://bugs.launchpad.net/kicad/+bug/1778408
Spacing text for plotters uses the thickness of text for two separate
classes. This sets the thickness in the EDA_TEXT class as well to allow
the multiple line positions to be correctly set
Fixes: lp:1799605
* https://bugs.launchpad.net/kicad/+bug/1799605
When starting Eeschema, or a frame/dialog using a SCH_DRAW_PANEL, the bg color was initialized too late,
thus creating a flicker or an annoying draw artifact (in SYMBOL_PREVIEW_WIDGET for instance) if a Paint event
is fired before the right bg color is initialized.
Initializing the bg color earlier fix this issue.
Fixes: lp:1797203
https://bugs.launchpad.net/kicad/+bug/1797203
Some MSW seem to have issues with the UTF-8 characters in const
wxString. This explictly casts to wxString from UTF-8 handling the
platform differences
Fixes: lp:1813329
* https://bugs.launchpad.net/kicad/+bug/1813329
Rather than selecting an arbitrary track to snap, we select the closest
track to our point, allowing the via to be placed along the full track
length.
Fixes: lp:1813324
* https://bugs.launchpad.net/kicad/+bug/1813324
Some microwave inductor lengths cause invalid outputs
for the calculations, which causes jagged outputs.
* If the request length is such that four arcs and no straight
segments is too long
* If the length is such that an N-turn coil is too short, but
an N+1-turn coil is too long. This can happen when the coil
count is small.
This patch doesn't fix the underlying geometric issue here - fixing
the first requires a numerical method, and fixing the second probably
needs an iterative approach. Both of these could benefit from
a refactor.
However, this patch does prevent the tools producing invalid outputs,
which can sometimes be quite subtle mistakes if the "jags" are small.
Fixes: lp:1792119
* https://bugs.launchpad.net/kicad/+bug/1792119
Phoenix doesn't have the same initialization as wxpython3 and so the
namespace doesn't get the wxApp() initialized to the existing instance.
In python, this is worked around by starting a new wxApp.
Unfortunately, this appears to overwrite the existing global instance
variable. The issue _appears_ to be in Phoenix but for now we work
around it by saving and resetting the instance pointer in the main app.
The downside is that Python likely won't be able to respond to events
from C++
Fixes: lp:1809913
* https://bugs.launchpad.net/kicad/+bug/1809913
This adds a simple unit test to qa_common to check coroutines
produce expected events in the right order.
This is an automated analogue to the user-facing tool in
qa/common_tools.
This program has been disabled for some time, but it's not
broken (even if the CMake was!).
Merging into the pcbnew_tools QA program reduces the CMake burden
and puts this tool in the same place as the others.
In the past, the ZONE_CONTAINER::GetPosition() member
returned a reference to a wxPoint, in accordance with the
BOARD_ITEM interface. This meant that ZONE_CONTAINER had
to reinterpret_cast a VECTOR2I (its internal position data) to wxPoint,
which was possible only due to fortunate memory layout.
This interface was changed to return wxPoints by value in
commit a4528988ca, and the normal (wxPoint) cast was used instead.
Thus, we can now also remove the dire warnings and static_asserts
used to ensure the now-unused old method was correct.
This means all the current Pcbnew utilities are all in a single
executable.
The tool is now run by:
$ qa/pcbnew_tools/qa_pcbnew_tools pcb_parser <same arguments as before>
Add a tool that allows a user to run DRC functions
on a given KiCad PCB file.
The first available functions are the courtyard functions.
Also move most of the utility program logic into qa_util for
better reusability.
Introduce the concept of a DRC_PROVIDER which allows
to separate the various DRC functions to their own
areas. This allows, amongst other things, a slimmer core
DRC class, and allows DRC functions to be separately testable.
The courtyard DRCs (overlap, missing and malformed)
are the first victims, so instrumentation can be added to this function.
Add some unit tests on this DRC function, as well a few re-usable PCB-based
utility functions in a library (qa_pcbnew_utils) that could be shared between
unit tests and other utilities.
This separates the "newMarker" functions from the DRC class. These
are moved to a new class, DRC_MARKER_FACTORY, which is now responsible for
constructing suitable markers from BOARD_ITEMS.
The reasons for this are:
1) Allow DRC related functions to access theese functions without having
to bake these functions into the main DRC class.
2) Thereby simplify the DRC class interface
3) As DRC_MARKER is now a small class with public interfaces, it's
possible to put unit tests on these functions.
The motivation here is to allow to start to split out pieces of DRC
into separate classes.
Prior to placing the via, we check if the resulting via will pass too
close to different nets on different layers.
Fixes: lp:1718827
* https://bugs.launchpad.net/kicad/+bug/1718827
Previously, when the 3D viewer is opened, each board edition creates a 3D view refresh, that usually takes a bit of time.
Now the refresh is postponed until the 3D viewer has the focus.
When creating the zone cutout, we delete the old zone and add a new one
with each cutout. This requires resetting the source zone and clearing
our previous selection if we would like to continue using the cutout
tool on the new zone.
Fixes: lp:1812339
* https://bugs.launchpad.net/kicad/+bug/1812339
Plotting mask layers, we expand by a minimum width before performing a
boolean add of the separate regions. The boolean add has a separation
condition that includes equality. Since we are looking for the
complement of the mask, we would like the equality applied to the other
side. Removing a unit value provides the separation.
Fixes: lp:1698457
* https://bugs.launchpad.net/kicad/+bug/1698457
When loading an existing file, a missing value in the soldermask min
width value should not be interpreted as a default value but rather as a
0 value. This corrects an issue introduced by 4d709d2392
When prompting for a new footprint library, we need to treat the input
as a file for creation rather than a directory for selection.
Otherwise, users cannot specify the name of their new footprint library
independently of the existing directory names.
Fixes: lp:1812135
* https://bugs.launchpad.net/kicad/+bug/1812135
There is some odd interaction in the default copy constructor for
TOOL_EVENT using boost::optional under gcc. Avoid this by explicitly
constructing the event needed for cut
Fixes: lp:1812848
* https://bugs.launchpad.net/kicad/+bug/1812848
The intention here is to make it possible to wrap up many of the
KiCad utility tools into a single executable. This reduces link times
as well as the duplication of CMake files needed to build very
similar tools.
This particular tool should be suitable for any code in common,
code in pcbnew and other end-executables probalby will need an
analagous version linked to the relevant kiface.
The first tool is the coroutine_example.cpp test case, which
can be useful when learning, debugging or porting the coroutine
infrastructure.