Similar case to the previous commit related to closed polylines having
coincident vertices, but this time for import. Basically if importing
DXF files containing closed polylines, FC would throw an exception.
This was because `BuildWireFromPolyline()` function in the DXF importer
attempted to create a closing edge for closed polylines by connecting
the last vertex back to first vertex.
So, this patch adds a skip for the closing edge if the vertices are
coincident.
AS the title says - when exporting closed curves (ellipses for example)
as polylines with the "Treat ellipses and splines as polylines" option,
the generated DXF file contained duplicate vertices. For example, an
ellipse polyline would have vertex1 and vertex40 which are identical in
terms of coordinates. This has caused exception upon importing.
Cause of that was that discretizer was blindly iterating through all
discretized points without checking if the first and last points are
coincident.
So, this patch adds a check for that to detect and skip the last
coincident point if it is in fact coincident during Export.
Currently if users enabled the "Treat ellipses and splines as polylines"
option in DXF export preferences and exported them, they were still
being exported as native primitives.
This was because we were reading from a wrong preferences location, UI
stored it in `BaseApp/Preferences/Mod/Draft`, but it was read from
`BaseApp/Preferences/Mod/Import`. Since the pref didn't exist, we were
taking default value which was set to `false`.
So the solution is obvious - just set it to the correct path.
This patch adds handling for different contexts that Clarify Selection's
long press may occur in. For example, different navigation styles,
transform tool, or dragger presence.
This way we are sure that the context menu for Clarify Selection won't
be popping up for the user when using one of the above-mentioned
contexts.
Also, this adds handling for different navigation styles, to accept
CTRL+LMB as the long press mouse-key combos, instead of just
long-pressing LMB, as in those navigation styles LMB is mostly used as
rotation.
As the title says. Two preferences, that reflect what has been added previously
- now the users can disable LMB at all, or increase the timeout through prefs.
The prototypes in the header file did not match the implementation in the
C source.
These issues were discovered when enabling link time optimization. There are
more LTO issues left to fix before it can be enabled, but these involve
mixing a C++ class and a pointer to floating point values and is a lot
more intrusive to fix.
This change is related to issue #13173, bringing LTO one step closer.
* Sketcher: Fix issue of reversed arcs input for polar pattern
* DrawSketchHandlerRotate: remove getRotatedPoint that is no longer needed
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update Geometry.cpp
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [PartDesign] create a new Gui Unit Test for the creation of a sketch and...
...improve the Selection Filter syntax error to show where it's being generated from.
* [PartDesign] address Lint feedback
* PD/Tests: Ensure test file does not exist before SaveAs
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Randomly discovered during some other bug hunt, only with
AddressSanitizer on. Basically, ASAN detected stack-use-after-return
when playing with spinboxes in the Light Sources preferences when Qt
signal handlers tried to invoke lambda callbacks that referenced
deallocated stack memory.
The main problem is that those lambda functions in the constructor
were captruing by reference. When they were connected to Qt signals
and invoked after constructor completed, they accessed stack vars that
have gone out of scope.
So fixed that by changing lambda captures from `[&]` to explicit captures:
- [this] for lambdas needing only class member access
- [this, updateLight] for lambdas that need both class members and the
`updateLight` lambda.