As discussed in 23399, discoverability is really poor as users doesn't know what Quick Measure is,
neither is it easy to find out as there's no visual feedback when toggling this feature.
The intension was to keep the command and only remove it from the menu, but that wasn't possible
due to ownership of quick measure object was inside the command. In addition the parameter had to
be renamed as well as mashing the qm button made them end up in an unknown state.
As the measurement can be disabled now by simply hiding the info text from context menu, we don't
need to keep the old toggling functionality.
"Professional CMake" book suggest the following:
"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."
Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
only 4 of these warnings are still relevant, CMake shall be used to disable them
Compiler definitions:
NOMINMAX:
* is already globally defined in SetGlobalCompilerAndLinkerSettings.cmake
WIN32_LEAN_AND_MEAN:
* use CMake target_compile_options on relevant targets
Warnings that still occur:
C4251, C4273, C4275: all related to dllimport / export
* use CMake target_compile_options on relevant targets
C4661: no suitable definition provied for explicit template instantiation request
* triggered in Mesh because of Vector3D in Base - not all functions are defined in header
* use CMake target_compile_options on relevant targets
Warnings that are Currently not triggered (fix code if they appear again):
C4005: macro redefinition
C4244: argument conversion, possible loss of data
C4267: conversion from size_t to type, possible loss of data
C4305: truncation from type1 to type2
* only occurrence disabled in Reader.cpp
C4522: multiple assignment operator specified
C5208: unnamed class in typedef name
Obsolete Compiler warnings:
C4181: not mentioned in Microsoft docs anymore
C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
* throw(optional_type_list) deprecated in C++17
C4482: nonstandard extension used: enum 'enumeration' used in qualified name
* not generated for compilers that support C++11
C4503: 'identifier': decorated name length exceeded, name was truncated
* obsolete since Visual Studio 2017
C4786: not mentioned in Microsoft docs anymore
* Measurement: Provide correct VP name for COM
This patch tries to provide proper ViewProvider name for COM, which
results in a proper pixmap assignment, which won't fallback to the
default measurement's tool icon for COM.
Since MeasurePython runs before actual COM python proxy assignments,
we can't access proxy easily from this point of code.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Measure: Use starts_with instead of find
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* Update src/Mod/Measure/App/MeasureBase.cpp
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* Measure: Add circle center distance types to quickmeasure
* Measure: Add cylinder axis distance types to quickmeasure
* Measure: Fix PointToCylinder minimum distance not computing
* Quickmeasure: compute circle and cylinder diameters when they are closed
* Quickmeasure: add angle measurement between cylinder & circle axes
* Quickmeasure: Remove minimum distance between circle center and cylinder surface
* [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>
+ Use Qt's translation of the Save and Close buttons
+ Use QShortcut instead of eventFilter() because the latter is
too aggressive eating all Enter and ESC events
This fixes the remaining issues as mentioned at the PR 17109
Made several fixes to TaskMeasure:
* Move to correct namespace
* Handle possible exception in update() method
* Add null pointer checks for buttonBox
* Cannot use 'Measure::MeasurePython' as template argument in addObject<>
because the macro PROPERTY_HEADER_WITH_OVERRIDE determines the invalid
string 'App::FeaturePythonT<FeatureT>' so that an exception is raised
Note: The changes might fix issue 20304
Measurement::getShape() used to call ShapeFinder::getLocatedShape()
that failed to return a valid shape in many cases. And the calling
instance didn't check for a valid shape either which caused
a segmentation fault.
Solution:
Replace ShapeFinder::getLocatedShape() with Part::Feature::getShape()
that works more reliably and where needed check for a valid shape
before accessing it.
This fixes issue 19452 and improves the fix for 19349
* [Meas]Fix visibility at load
* [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>
* [Measure] Revert one specific piece of code from PR19142
* Measure: Add comment for workaround
---------
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
* Light refactor of getTopoShape function
* Fix hole edge case
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update src/Mod/Part/App/PartFeature.cpp
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Update src/Mod/Part/App/PartFeature.cpp
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Update src/Mod/Part/App/PartFeature.cpp
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Update src/Mod/Part/App/PartFeature.cpp
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Refactor simplifyCompound()
* Use Base::Flags<GetShapeOption>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Shorten enum name and move it from class scope to namespace scope
* [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>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Measure: Fix delta label font size
- Add font size field to ViewProviderMeasureBase which connects to other fields
- Remove dead code in DimensionLinear which internally is using FrameLabel
- Connect FrameLabels's fontsize property to DimensionLinear's property
* [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>