Our GUI code uses a mix of floats and doubles to represent floating
point numbers, and in a few places interchanges them in a way that
causes an invisible loss of precision. Change the double precision
"default" values to float defaults, and use the appropriate value for
pi.
There are multiple possible conversion paths for a QPixmap to QVariant,
which results in a compiler warning. Explicitly specify the path we
intend to silence the warning.
`std::shared_ptr` default-initializes to `nullptr`, so there is no need
to do it manually, and in the current code the initialization is in the
wrong order (so generates a compiler warning).
Commit 1155f0d7 changed `UnitsApi::getDecimals()` from `int` to
`size_t`, which changes the meaning of the negation since it is now
unsigned. Cast it to an integer before the negation to restore the old
behavior.
Currently there's no option for selecting active working plane other
than selecting `DoubleClickActivates` property on a BIM Level.
So, this patch adds an additional button for the submenu that BIM Views
provides - to activate working plane of the selected item.
Some of the objects, like Column, or Beam do not contain `IFC
Attributes` if they are initially created.
As it turns out, they are not being created as we are checking for
`onDocRestoredDone` attribute, which is assigned in `onDocumentRestored`
function. Since users can usually just not restore a document, but just
play on a newly created document, this attribute won't be available,
thus we won't be going through whole `onChanged` logic which populates
`IFC Attributes`.
To preserve current functionality of this additional parameter and not
cause the previous errors to happen, this patch just changes from the
custom flag to globally available `Restoring` flag which tracks document
being restored more reliably.
Fixes#21179.
This PR uses the built-in solution to close the task panel.
I was not aware of this feature before. My 2 previous PRs related to the closing of task panels, #20719 and #21073, will (largely) have to be reverted/redone in favor of this solution.
The `aux.fake_function` is used in the Draft unit tests as a substitute for functions that, in most cases, do not yet exist. But in test_modification.py it would overwrite Draft.extrude leading to issues with BIM unit tests.
See:
https://github.com/FreeCAD/FreeCAD/pull/21134#issuecomment-2869178563
* [Mod] Draw remove
removed deprecated drawing module
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [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>