QuickMeasure: Do not measure datums

This commit is contained in:
PaddleStroke
2025-03-17 20:01:49 -03:00
committed by Adrian Insaurralde
parent edfe5f4958
commit 0fcdecc934
+3 -2
View File
@@ -40,6 +40,7 @@
#include <Mod/Part/App/PartFeature.h>
#include <Mod/Part/App/TopoShape.h>
#include <Mod/Part/App/DatumFeature.h>
#include <Mod/Measure/App/Measurement.h>
@@ -133,8 +134,8 @@ bool QuickMeasure::shouldMeasure(const Gui::SelectionChanges& msg) const
bool QuickMeasure::isObjAcceptable(App::DocumentObject* obj)
{
// only measure shapes
if (obj && obj->isDerivedFrom(Part::Feature::getClassTypeId())) {
// only measure shapes. Exclude datums that derive from Part::Feature
if (obj && obj->isDerivedFrom<Part::Feature>() && !obj->isDerivedFrom<Part::Datum>()) {
return true;
}