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>
* [FreeCAD-20111] Sketcher: Scaling of a sketch containing BSplines doesn't work
When we executing Scale cmd we don't will lose knots information from shape geometry and it cause the scaled spline build with issue knots and it lead solver gets compute issue.
1. Add string format function PythonConverter::makeArryString(const std::stringstream& ss) for processing the control pnts string, mults string and knots string.
2. Add mults and knots information for python obj to make BSplineCurvePy::buildFromPolesMultsKnots(Args...) initialized Geom_BSplineCurve correctly.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* 1. fix typo
2. Add wights info to keep spline shape after convert from python object
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* 1. remove static function makeArrayString() from PythonConverter
1. Add template function makeSplineInfoArrayString() to generate string for cleaner code.
2. change python string format as review suggestion
* use fmt format
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ciFixes#20111
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>