From: mpv Date: Thu, 1 Sep 2016 15:34:18 +0000 (+0300) Subject: Make nested sketch not displayed after dump in the neutral point. X-Git-Tag: V_2.5.0~82 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee0d8d13f92e79b6a06e07c34ef85925014aab64;p=modules%2Fshaper.git Make nested sketch not displayed after dump in the neutral point. --- diff --git a/src/FeaturesAPI/FeaturesAPI_Extrusion.cpp b/src/FeaturesAPI/FeaturesAPI_Extrusion.cpp index 4692cc103..bb2cb99ac 100644 --- a/src/FeaturesAPI/FeaturesAPI_Extrusion.cpp +++ b/src/FeaturesAPI/FeaturesAPI_Extrusion.cpp @@ -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()); diff --git a/src/FeaturesAPI/FeaturesAPI_ExtrusionBoolean.cpp b/src/FeaturesAPI/FeaturesAPI_ExtrusionBoolean.cpp index 386afe554..26307f4e7 100644 --- a/src/FeaturesAPI/FeaturesAPI_ExtrusionBoolean.cpp +++ b/src/FeaturesAPI/FeaturesAPI_ExtrusionBoolean.cpp @@ -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()); diff --git a/src/FeaturesAPI/FeaturesAPI_Revolution.cpp b/src/FeaturesAPI/FeaturesAPI_Revolution.cpp index e07354139..061a97457 100644 --- a/src/FeaturesAPI/FeaturesAPI_Revolution.cpp +++ b/src/FeaturesAPI/FeaturesAPI_Revolution.cpp @@ -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()); diff --git a/src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.cpp b/src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.cpp index b463b9a11..118bd2fe8 100644 --- a/src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.cpp +++ b/src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.cpp @@ -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());