When searching for fields, the code was sometimes comparing translated and not translated names.
This is an issue for mandatory fields, in non English languages.
Translated field names should be used only in messages.
Using a UTF8 char inside a C string can work on unix, but not on Windows.
It must be explicitly converted in a unicode value inside a wide string
(like a wxString)
When adding a .pretty library, if the actual .pretty folder were
selected then no folder would be added to the list of libraries.
This led to an assert when normalizing paths, and the library
not being added.
Add also a comment in common.cpp about using wxLocale instead of setlocale.
DIALOG_UPDATE_FIELDS has issues in non English languages, due to its design.
The fix for mandatory fields is only a partial fix that avoid major issues.
The immediate action option clears (or not) the position of the events.
We use this to determine if the command should start at the given
position or merely activate the tool. This was being checked in the
menu options, which only activated for tool commands in the context
menu. Moving to the process event, we catch hotkeys as well.
This also restores the previous logic in eeschema that used a static
variable for storing wires rather than the private class variable.
Starting the draw event now picks up from the existing wires when
activated in immediate mode.
Fixes#3891 | https://gitlab.com/kicad/code/kicad/issues/3891
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.
The combination of left over test code in lib_id.h/cpp and the changes
to handle the DEBUG compiler flag correctly on all platforms exposed a
swig issue on debug builds. Removing the offending test from lib_id.h
resolved the issue.
This variable is empty, so the argument evaluated to "-I", and the next
argument was then interpreted as a path (and thus ignored). This hides a
preprocessor definition (-D) from Swig.
If the point editor is active and a change is made, the tool was shut down after
deleting the board data, in the frame Dtor.
Therefore a crash happened because a call to GetScreen()->SetModify(); using a null pointer,
and after the test for modifications was done.
Now tools are stopped when closing the window, before any test for modifications.
In case we ever can fully-support VS, we can consider removing
CMakeSettings.json from the ignore list and shipping a good set
of defaults for this file.
Now that the tool framework gracefully shutdowns the tools, graphics
can be created on the stack inside a tool function.
This reverts commit f6881ce3de.
The parents are the only items that live in the RTree, so the rebuild
check needs to recurse into the sub structure to check for selection
Fixes https://gitlab.com/kicad/code/kicad/issues/3858
Previously, OnModify() was called for a lot of items, even when not modified.
For large schematics, the calculation time was unreasonable ( several minutes)
It is now called only a few times.