From: nds Date: Wed, 8 Jul 2015 09:11:55 +0000 (+0300) Subject: Regression fix. The rigit is created by preselection correctly. X-Git-Tag: V_1.3.0~80 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=807bfbc6aac252230d6fff790240dbad165af123;p=modules%2Fshaper.git Regression fix. The rigit is created by preselection correctly. --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp b/src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp index 78574b338..8867e16d5 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp @@ -36,7 +36,17 @@ AISObjectPtr SketchPlugin_ConstraintRigid::getAISObject(AISObjectPtr thePrevious AISObjectPtr anAIS = thePrevious; if (anAIS.get() == NULL) { - anAIS = SketcherPrs_Factory::rigidConstraint(this, sketch()->coordinatePlane()); + std::shared_ptr aData = data(); + std::shared_ptr anAttr = + std::dynamic_pointer_cast(aData->attribute(SketchPlugin_Constraint::ENTITY_A())); + ObjectPtr aObj = anAttr->object(); + if (aObj.get() != NULL) { + FeaturePtr aFeature = ModelAPI_Feature::feature(aObj); + std::shared_ptr aSkFea = + std::dynamic_pointer_cast(aFeature); + if (!aSkFea->isExternal()) + anAIS = SketcherPrs_Factory::rigidConstraint(this, sketch()->coordinatePlane()); + } } return anAIS;