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.
When preparing for clearing the tree, GTK requires walking through
parents. After calling "Freeze()" to protect against returning bad data
(see #6458 and #4471), we can no longer access Parent() from GTK and the
tree cannot be cleared.
The fix is to collapse the first element if it is open. This prevents
the common case of the history elements being expanded in the tree
Fixes https://gitlab.com/kicad/code/kicad/issues/6102
This looks like it was always intended for macOS but was accidentally changed for Windows as well.
If this is a requirement on windows, I'm sure theres better ways to fix it....
Cherrypick from 98ece9d
- 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
In some cases, the BeforeReset() will cause an iteration over the tree
elements. If we have deleted an element before doing this, we risk a
corruption/crash.
Fixes https://gitlab.com/kicad/code/kicad/issues/6192
(cherry picked from commit 3bd080b64e)
The stepping is in a static event handler, so it is called
after the dynamic handler and so the dynamic handler must
allow the event to continue processing.
Fixes https://gitlab.com/kicad/code/kicad/issues/5319
Previously the variables that were defined externally weren't being
readded to the variable map, so they would not appear in the dialog
the next time.
(Cherry-picked from fedc6519cd)
Just setting the text field is not guaranteed to fire
a text event, so we must forcefully call the regenerate
function to ensure the preselect is handled.
Fixes https://gitlab.com/kicad/code/kicad/issues/4105
(Cherry-picked from 63b53c3968)
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)
When drawing segments that are smaller than the segment width, OpenGL
did not use realistic values, leading to hidden, small tracks. Instead,
we set the track to only draw a segment when the length is at least 1
radius long (so that we can see the full semi-circle at the track end)
Fixes https://gitlab.com/kicad/code/kicad/issues/5009
(cherry picked from commit 294dabf640)
We output a 0 opacity text in the SVG plotter to allow searching. When
this text is changed to 100 opacity, it can show up on the user screen
and so needs to be mirrored to match the stroke font output
Fixes https://gitlab.com/kicad/code/kicad/issues/5001
(cherry picked from commit b650e4568b)
Some buggy SVG interpreters can't handle 0-length ovals. In this case,
they are meant to be circles, so we can export as circles in our
plotter.
Fixes https://gitlab.com/kicad/code/kicad/issues/3995
(cherry picked from commit e38ab6c699)
Due to rounding issues, sometimes (especially for rotated pads)
the region (4 segments+4 arcs) was incorrectly closed
1 unit (nanometer) mismatch between start point and end point.
Although it does not create bad shape, its breaks the round rect pad
identification in CAM tools. start point and end point are now the same.
From master.
This is required, because Ninja otherwise doesn't properly rebuild after
updating the version string header file.
Because BYPRODUCTS requires CMake 3.2, bump the minimum version and remove
now unused compatibility code for older CMake versions.
These pads were plotted as a segment. This is not the right way:
Pads must be flashed or plotted as regions, not painted.
They are now plotted as Gerber regions round rectangle pads.
These regions are similar to flashed pads.
From Master branch, commit de7154e8e.
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.
Previously, for historical reasons, they were added only if
Include Netlist Attributes option was on.
But Aperture Attributes have nothing to do with Netlist Attributes, and good
Gerber files must include them.
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