Merge pull request #20040 from PaddleStroke/patch-12
QuickMeasure: Do not measure datums
This commit is contained in:
@@ -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>()) {
|
||||
// only measure shapes. Exclude datums that derive from Part::Feature
|
||||
if (obj && obj->isDerivedFrom<Part::Feature>() && !obj->isDerivedFrom<Part::Datum>()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user