]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make nested sketch not displayed after dump in the neutral point.
authormpv <mpv@opencascade.com>
Thu, 1 Sep 2016 15:34:18 +0000 (18:34 +0300)
committermpv <mpv@opencascade.com>
Thu, 1 Sep 2016 15:34:18 +0000 (18:34 +0300)
src/FeaturesAPI/FeaturesAPI_Extrusion.cpp
src/FeaturesAPI/FeaturesAPI_ExtrusionBoolean.cpp
src/FeaturesAPI/FeaturesAPI_Revolution.cpp
src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.cpp

index 4692cc103806a99ae5ec38533c1996af2a3aa7ed..bb2cb99ac246ccbb05b103d702f8411de3d4af54 100644 (file)
@@ -114,8 +114,11 @@ void FeaturesAPI_Extrusion::setNestedSketch(const ModelHighAPI_Reference& theSke
 {
   mysketch->setValue(theSketch.feature());
   // to inform that the history is updated due to the sketch moved under the composite feature
-  if (theSketch.feature().get())
+  if (theSketch.feature().get()) {
     theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
+    if (theSketch.feature()->firstResult().get())
+      theSketch.feature()->firstResult()->setDisplayed(false);
+  }
   mybaseObjects->clear();
   mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
 
index 386afe55423f87ba697a6e44da4d303a24dd9bd9..26307f4e76ac968af5d5e0d022fa4da9bef78efe 100644 (file)
@@ -27,8 +27,11 @@ void FeaturesAPI_ExtrusionBoolean::setNestedSketch(const ModelHighAPI_Reference&
 {
   mysketch->setValue(theSketch.feature());
   // to inform that the history is updated due to the sketch moved under the composite feature
-  if (theSketch.feature().get())
+  if (theSketch.feature().get()) {
     theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
+    if (theSketch.feature()->firstResult().get())
+      theSketch.feature()->firstResult()->setDisplayed(false);
+  }
   mybaseObjects->clear();
   mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
 
index e073541390548852a3dfa017b25b74fdbc8e2f47..061a974579fceecd635db1d4124000c1a2af674a 100644 (file)
@@ -75,8 +75,11 @@ void FeaturesAPI_Revolution::setNestedSketch(const ModelHighAPI_Reference& theSk
 {
   mysketch->setValue(theSketch.feature());
   // to inform that the history is updated due to the sketch moved under the composite feature
-  if (theSketch.feature().get())
+  if (theSketch.feature().get()) {
     theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
+    if (theSketch.feature()->firstResult().get())
+      theSketch.feature()->firstResult()->setDisplayed(false);
+  }
   mybaseObjects->clear();
   mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
 
index b463b9a113e9abaf9aae496b9f4d91f826afd52b..118bd2fe85cdaf129c1ed3712e0d3a83f4bd2db4 100644 (file)
@@ -27,8 +27,11 @@ void FeaturesAPI_RevolutionBoolean::setNestedSketch(const ModelHighAPI_Reference
 {
   mysketch->setValue(theSketch.feature());
   // to inform that the history is updated due to the sketch moved under the composite feature
-  if (theSketch.feature().get())
+  if (theSketch.feature().get()) {
     theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
+    if (theSketch.feature()->firstResult().get())
+      theSketch.feature()->firstResult()->setDisplayed(false);
+  }
   mybaseObjects->clear();
   mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());