ref. https://forum.freecadweb.org/viewtopic.php?f=23&t=62274&sid=4c9d07255e4f0db219b661c345768319
If the cursor is over a Face and no SnapCenter is active, the snapToObject method returns the current cursor point instead of None. Doing so the snap() method does not check for extension and grid snaps.
It seems this is a bug since the snap() already contains the deleted code.
One note: the no snaps case was moved before the lastObj setting, since if no snap point was found, it's not right to set it to a non snapped object.
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>