From: azv Date: Thu, 5 May 2016 06:26:55 +0000 (+0300) Subject: Fix problem with loading solvers plugins X-Git-Tag: V_2.3.0~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c8dad4c61f1b846e74ce536f539822101205556a;p=modules%2Fshaper.git Fix problem with loading solvers plugins --- diff --git a/src/SketchPlugin/SketchPlugin_Feature.h b/src/SketchPlugin/SketchPlugin_Feature.h index de39f17b8..4d0aa22c8 100644 --- a/src/SketchPlugin/SketchPlugin_Feature.h +++ b/src/SketchPlugin/SketchPlugin_Feature.h @@ -39,6 +39,12 @@ class SketchPlugin_Feature : public ModelAPI_Feature return false; } + /// Returns true if the feature is a copy of other feature + SKETCHPLUGIN_EXPORT virtual bool isCopy() const + { + return false; + } + /// Moves the feature /// \param theDeltaX the delta for X coordinate is moved /// \param theDeltaY the delta for Y coordinate is moved diff --git a/src/SketchSolver/SketchSolver_Storage.cpp b/src/SketchSolver/SketchSolver_Storage.cpp index c63d28e43..587a3f31d 100644 --- a/src/SketchSolver/SketchSolver_Storage.cpp +++ b/src/SketchSolver/SketchSolver_Storage.cpp @@ -177,7 +177,7 @@ bool SketchSolver_Storage::update(FeaturePtr theFeature, const GroupID& theGroup // Check external feature std::shared_ptr aSketchFeature = std::dynamic_pointer_cast(theFeature); - if (aSketchFeature && aSketchFeature->isExternal()) + if (aSketchFeature && (aSketchFeature->isExternal() || aSketchFeature->isCopy())) aGroup = GID_OUTOFGROUP; aRelated = aBuilder->createFeature(theFeature, aSubs, aGroup); if (!aRelated) @@ -223,7 +223,7 @@ bool SketchSolver_Storage::update(AttributePtr theAttribute, const GroupID& theG // Check attribute of external features std::shared_ptr aSketchFeature = std::dynamic_pointer_cast(theAttribute->owner()); - if (aSketchFeature && aSketchFeature->isExternal()) + if (aSketchFeature && (aSketchFeature->isExternal() || aSketchFeature->isCopy())) aGroup = GID_OUTOFGROUP; aRelated = aBuilder->createAttribute(anAttribute, aGroup); if (!aRelated)