]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Hide sub-objects of sketcher
authorvsv <vitaly.smetannikov@opencascade.com>
Wed, 8 Jul 2015 12:21:21 +0000 (15:21 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Wed, 8 Jul 2015 12:21:21 +0000 (15:21 +0300)
src/SketchPlugin/SketchPlugin_Sketch.cpp

index 84170754a6385fc5d4d7f2ee6998c63795640024..d332177c3a702f56c9698ef614827dc44ce3ad64 100644 (file)
@@ -161,11 +161,16 @@ void SketchPlugin_Sketch::removeFeature(std::shared_ptr<ModelAPI_Feature> theFea
 
 int SketchPlugin_Sketch::numberOfSubs(bool forTree) const
 {
+  if (forTree)
+    return 0;
   return data()->reflist(SketchPlugin_Sketch::FEATURES_ID())->size();
 }
 
 std::shared_ptr<ModelAPI_Feature> SketchPlugin_Sketch::subFeature(const int theIndex, bool forTree) const
 {
+  if (forTree)
+    return FeaturePtr();
+
   ObjectPtr anObj = data()->reflist(SketchPlugin_Sketch::FEATURES_ID())->object(theIndex);
   return std::dynamic_pointer_cast<ModelAPI_Feature>(anObj);
 }