After placing a zone, we want to be able to immediately edit the zone
points. But in the zone tool, we have the intermediate context menu
that doesn't help, so breaking back to the selection tool simplifies
that workflow
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21319
After forcing the locale-specific read/writes out of our IO, we can
remove the global LOCALE_IO calls in many places.
Still to do: exporters, pcm, specctra, settings, drawing sheets,
plotters
Use only C-locale functions wxString::ToCDouble and fmt::format{}
functions so that we do not need to set the locale for file io
operations
This also introduces a cmake check that looks for certain banned
functions (strtod, strtof and atof) that convert strings into doubles
by the user locale or formatting specifiers like %f/%g that convert
doubles into strings by the users locale. It will prevent compilation
in this case.
For the limited cases where we want to show the user a string in their
locale, we have an override string "format:allow" that can be added to
lines in order to allow them with %f/%g format specifiers
This will also handle the case when more than two items are subtracted,
e.g. many small items witrhin one larger item. Again, thanks to
Kliment for a smart idea!
While there is technically some kinds of defined order (last selected item is
'A' in the 'A - B (- C...)' operation, it's easy to drag select and then
get a null result.
So if this happens to a non-commutative operation, try again in the
reverse order. In the usual case (2 items), this will get what the user,
presumably, wants. If there are more than 2, it will either work, or the
user can undo and try merging the "B" operand before subtracting, or do
them one at a time (at which point the order-reverse logic will help
again).
Thanks to Kliment for an this usability suggestion!
The child class removes itself from the parent panel, which calls the
DTOR. This automatically disconnects the events, so if we want to
explicitly do this, we need to do it before freeing the memory
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21307
Teardrops are calculated as zones, so when we create a board with
thousands of teardrops, we don't want to run O(n^2) checks on the
clearance between multiple teardrops. Instead, we can check only the
clearance where the two zones have the potential to interact
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21226