Returning a null shape would have triggered an exception in the bottom branch but not in the top one - which later leads to a segfault - solution - raise an exception. OOC doesn't like null shapes.
The measurement code did not handle mixed selections of known and unknown types correctly. Although a unknown selected object would leave the type at Invalid, selecting both known and unknown objects would have the type determined by the known object type and treat the unknown as the same. This causes exceptions and - worst case a segmentation fault.
This fix introduces a new category "other" which - if present in a selection always forces type to Invalid. This should be forward compatible in case new types are introduced in the future.
* Initial commit to apply delta also for interactive measurement
* Not required special logic to check if possible, it can be easily checked if the property exists
* remember setting so it is not required to turn it always on
* MeasureGui: Store measure type in TaskMeasure
* MeasureGui: Avoid adding measurement to document during command interaction
* [Gui] Add check for document in VPDocumentObject::getActiveView
* MeasureGui: Track the document when adding objects
* MeasureGui: Cleanup python measurement creation
* [Gui] Add isAnnotationViewProvider method
* [Gui] Check if viewprovider is added as an annotation in getActiveView
* [Gui] Add takeAnnotationViewprovider method to Gui::Document
* [Gui] Make addViewProvider public
* [MeasureGui] Add existing view provider to document when storing measurement
* [MeasureGui] Fix invocation of initial label placement
* [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>
* Core Icon Revision
Update utilities-terminal.svg
Update button_add_all.svg
pixel alignment
Pixel alignment was performed for the specified icons.
* Changes requested by Obelisk
* Return old icons
* avoid redefines in Assembly
* explicit cast from size_t to int
* remove unused variables
* avoid implicit cast from double to float
* in test cases replace EXPECT_FLOAT_EQ with EXPECT_DOUBLE_EQ or EXPECT_NEAR when doubles are used