* 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
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>