]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix problem with loading solvers plugins
authorazv <artem.zhidkov@opencascade.com>
Thu, 5 May 2016 06:26:55 +0000 (09:26 +0300)
committerazv <artem.zhidkov@opencascade.com>
Thu, 5 May 2016 06:28:11 +0000 (09:28 +0300)
src/SketchPlugin/SketchPlugin_Feature.h
src/SketchSolver/SketchSolver_Storage.cpp

index de39f17b8c7dc41c096918d610500afa6e705225..4d0aa22c871d4acf5c8eac69fc2c8e55237b0606 100644 (file)
@@ -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
index c63d28e437a662c61818cf2c85b400e6f0f3516d..587a3f31d03e92aefd2440f207ca30adb0081095 100644 (file)
@@ -177,7 +177,7 @@ bool SketchSolver_Storage::update(FeaturePtr theFeature, const GroupID& theGroup
     // Check external feature
     std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
         std::dynamic_pointer_cast<SketchPlugin_Feature>(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<SketchPlugin_Feature> aSketchFeature = 
         std::dynamic_pointer_cast<SketchPlugin_Feature>(theAttribute->owner());
-    if (aSketchFeature && aSketchFeature->isExternal())
+    if (aSketchFeature && (aSketchFeature->isExternal() || aSketchFeature->isCopy()))
       aGroup = GID_OUTOFGROUP;
     aRelated = aBuilder->createAttribute(anAttribute, aGroup);
     if (!aRelated)