LGTM complains about using continue statements inside a loop
whose condition is always false. In addition, the C++ core guidelines
recommend against using the do...while construct, and in this case it
was really serving as a goto, just hiding the actual goto keyword.
This commit replaces the loop and continue structure with simple
conditionals.
Prior to a recent commit (or this, if squashed), yield points of a non-linear
material with simple hardening were stored as three different properties. These
changes consolidate them into the new `YieldPoints` property.
String List instead of String should allow for arbitrarily many entries,
theoretically.
Note the defaults previously in `YieldPoint1` an `YieldPoint2` were arbitrary.
Now the list is kept empty by default.
Fixes issue #4720.
* [PD] Add new need active body dialog
Intended for use wherever an active body is needed but none exists. The dialog
contains a list with the bodies present in the document, with an extra option to
make a new body. Custom text can be provided if needed.
This commit also replaces the warnings used by "new sketch" and "primitive"
command with this new dialog.
Addresses issue #4288.
* Fix lost filename in err msg
In some circumstances, FileExceptions are constructed empty, then have a
filename assigned to them, but the error message in these scenarios is
left as the default "unknown" one, which is sometimes shown to users.
This change fixes that case to be consistent with instances that are
constructed with the filename.
The exception can happen when trying to save the file in a location that does
not exist, or when the user does not have permission to write there. If it
comes when saving after closing the document, all previous changes can be lost.
Partially fixes issue #4098.
Co-authored-by: Heewa Barfchin <heewa.b@gmail.com>
The FCGlobal.h can be included in a Global.h header file of an extension module.
The reason is that some IDEs (e.g. QtCreator) fails to detect the export/import macros when only defined in the PreCompiled.h files and thus raise a parser warning.
When creating the original list of locales available to FreeCAD, also
scan the external directories and add those entries to the list of
locales. This enables the installation of a language pack in an
already-installed version of FreeCAD, allowing translators to test their
work more easily.
Add a hidden preference that will allow translators to add an entirely new
language to FreeCAD via user preferences, without requiring modification
of the FreeCAD source code.
Add a hidden preference for an additional translation directory.