The overload of wxFilePath::FindValidPath() broke the normal behavior
when the file searched for existed in the current working directory.
This was causing the initial library table file to be copied from the
current working directory instead of from the list of search paths.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9599
(cherry picked from commit f4b97eca63)
Mostly from c6bcb85562 but trees have
diverged sufficiently that there are others mixed in. This removes the
system() call on MacOS when opening a directory
From Master, commit 686254.
In some cases a created pad stack name had the same name as an other pad stack
having a slightly different shape, thus creating pads with a incorrect shape on board.
Fixes#6495 for the 5.1.10 branch.
wxTextFile uses wxFile which uses write syscalls which means its unbuffered.
This makes file IO more expensive against network shares where it will flush far too aggressively.
wxTextFile is fine for reads however.
wxFloatingPointValidator has some limitations, but mainly the change is a try
to fix an annoying issue (#6670) we cannot reproduce but is probably related
to a locale issue.
- New public static function OPENGL_GAL::CheckFeatures() gets called in EDA_DRAW_PANEL_GAL::SwitchBackend() before switching to OPENGL_GAL
- Moved all OpenGL feature checks from OPENGL_GAL constructor to OPENGL_GAL::init()
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4714
The base GAL has the linewidth property already, and its
accessor will only return the base version. This was causing
problems with the Cairo printing GAL, since that setter wasn't
using the base class version. Also, this removes the print-specific
setter, since the actual setting of line width shouldn't be done
there and is instead done where the drawing happens.
Fixes https://gitlab.com/kicad/code/kicad/issues/5089
(Cherry-picked from 5684708b22)
The old way of checking for focus loss caused GTK to be unable to
even open the combobox. This way checks for the event sent when the
list closes and uses that to close the grid editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/4617
(Cherry-picked from af24a5d5a7)
- Clear object attributes before and after plotting a zone.
It avoid using previously defined object attributes when plotting the next
zone, and using therefore incorrect attributes.
- Add aperture attribute to filled zone solid polygons (regions in Gerber)
From master branch
both Ucamco and Eurocircuits.
Update message in plot dialog about best solder mask clearance value.
Show a warning message in plot dialog if these values are no 0.
From master branch.
SCH_SHEET objects can only have another SCH_SHEET object as a parent
or nullptr for the root sheet so overload EDA_ITEM::SetParent() to
prevent the parent from being set to another type of object and add
some checks to the root sheet code just in case someone gets clever
and attempts to bypass the overloaded SetParent() call.
(cherry picked from commit fa57c8a570)
Previously, the region was a usual polygon with arc approximated by segment.
Using a region with arcs is a better way because it allows CAM tools to
identify this region as a round-rect pad.
Similar to master branch, commit 9cb3333d05.
When the solder mask min size is > 0, pads are no longer flashed or regions items.
Good Gerber files need pads flashed or regions items.
Non 0 solder mask min size is reserved to special cases (home made PCBs for instance)
From master branch.
Previously we call only setlocale( xx, "C" ), but it was not enough on Windows.
Now we call wxLocale("C")
wxLocale calls setlocale, but also make some others initialization in wxWidgets.
It fixes some issues related to comma versus point as fp separator.
Especially wxWidgets warnings are no longer thrown, and a one case of incorrect
conversion is fixed.
However, wxLocale( "C" ) also switches the current translations to English, so
loading files can have a slightly different behavior
The new line collision search uses BBox() to check for colliding
objects. BBox in the SHAPE_LINE_CHAIN did not include width as the
chains were assumed to be zero-width. This is not the case for
PNS::LINE elements.
We mostly don't notice this because DRC checks for SEGMENT collisions
but it becomes obvious/annoying when we cannot place a track for unknown
reasons and the snap-back doesn't take line width into account.
Fixes#3776 | https://gitlab.com/kicad/code/kicad/issues/3776
(cherry picked from commit fe15511d38)
In some cases it was not working well.
Opengl was using an other algo (using the curve properties to create segments)
Now only the OpenGL algo is used,
with optimization to reduce the number of segments.
This set the polygon preview item to wider size and adjusts the draw
order to ensure it remains visible even when antialiasing
(cherry picked from commit ea1c8525ce)
rect (when not horizontal or vertical), trapezoid and custom shapes are draw as polygons.
The dummy pad used to give attributes is removed, and TO attributes are used in Regions (polygons in Gerber dialect)
This is due to some modifications in Gerber format since the attributes are added in Kicad.
deque structures have higher overhead than vectors. Not usually
problematic, but with hundreds of thousands of characters each with only
a few strokes, the overhead becomes dominant.
(cherry picked from commit 6084614371)
that can generate the same hash for 2 different footprints.
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 reliable 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
* 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
(cherry picked from commit b33c3a5ad8)
The OnKillFocus handler of the UNIT_BINDER replaces the text in the
control with the evaluated string, which removes the selection. To
get the original text on the primary selection clipboard, we must
add it ourselves.
Fixes: lp:1794623
* https://bugs.launchpad.net/kicad/+bug/1794623
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
(cherry picked from commit 24454f5105)
You can trigger it before this fix by running Cvpcb when a .kicad_mod file is
incorrectly set as "Legacy" in your footprint table.
(cherry picked from commit e269b5d1b9)
The base initialization of EDA_RECT sets a 0/0/0/0 rectangle that
prevents merging properly with valid EDA_RECT. This sets the default to
be uninitialized until the internal data are set.
(cherry picked from commit 46feb76aba)
1) Intermediate states might be self-intersecting, and we shouldn't
be policing our users on what order to do things in
2) The polygon might already be self-intersecting, at which point we're
preventing the user from fixing it.
Also includes better const management for SHAPE_POLY_SET API.
Fixes: lp:1833831
* https://bugs.launchpad.net/kicad/+bug/1833831
(cherry picked from commit a3c74051c2)
1) Generate refreshPreview events so the modern toolset doesn't
fall behind by one event (see LP:1818667)
2) In the legacy toolset don't call unimplemented routines and don't
snap to grid on the non-movement axis.
Oblong holes (slots) use now a aperture attribute similar to round holes.
(The previous attribute "slot" is now deprecated)
However they have a specific aperture, and a comment is added in drill files for these apertures.