This fixes the compiler warning: unused parameter 'mode' [-Wunused-parameter]
It's a regression of #16889 to not initialize the class member m_createMode any more that causes UB,
i.e. whenever m_createMode is accessed it may return an unexpected value.
* Changed QuickMeasurement to be conservative
QuickMeasurement should not measure while tool dialogs are open
this includes but is not limited to editing sketches
also changed several other sanity checks to be opt-in vs opt-out, as discussed.
* move the test if it is safe to measure to when the measurement actually happens - avoids any potential race conditions
Fixes#17027.
The `DraftTaskPanel.reject()` function can be called multiple times if Esc is pressed during a fast mouse move. We need to prevent multiple calls to `draftToolBar.escape()` as this will lead to multiple calls to `gui_utils.end_all_events()` which results in a crash.
In V1.0 the handling of wall normals has changed. As a result existing walls with their Normal set to [0, 0, 0], based on wires or faces with a shape normal pointing towards -Z, would be extruded in that direction instead of towards +Z as before. To avoid this their Normal property is changed to [0, 0, 1].
* Prevent naming properties with reserved words (Fix#16846)
* Prevent using reserved constant names for properties or aliases
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* App: Add unit test for isTokenAConstant
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
An error in the Italian translation added an extra '{}' to the
translation string resulting in a dump when formatting.
This has also been updated in CrowdIn but as it's causing a crash is
also beiung changed via this PR. It should updated correctly when
doing the next translation pull.
Fixes#16704
* Change usage of sample shader code to one with compatible license.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
A loft or pocket only makes sense if the segments used for it have some minimum separation. Having the shapes identical causes segfaults in OCCT
Checking for CoG is a hack. Identical shapes have identical CoG - but an identical CoG does not necessarily mean identical shapes - however it can be argued that a shape that is not offset at least somewhat in the direction of the loft doesnt make a valid shape for a loft (it will typically freeze OCCT instead of crashing it) and a sufficiently suitable shape will have a different CoG
throwing the exception will make it easy to identify if there ever is a case where this is a bad thing - and exceptions are better than segfaults.
This is a stopgap measure, I don't know if the underlying issue is fully understood - but this prevents it from happening in the given test case.
By overriding the base for the pocket prism, which is a trick also applied by
TopoShape::makeElementPrismUntil() if the prism creation fails on first try, the bug where said prism goes to the wrong shape is avoided - this on its own would however break a pad in the inverse case, so we only do that when pocketing