From: nds Date: Wed, 27 May 2015 17:57:26 +0000 (+0300) Subject: Fillet is macro, that means that this feature is deleted on commit of the operation. X-Git-Tag: V_1.2.0~43 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=12fd8bfbd71aa0ca2eb987b8d1bf6f40f8aaec75;p=modules%2Fshaper.git Fillet is macro, that means that this feature is deleted on commit of the operation. There is a correction in sketch functionality, concered to the case that all comitted nested features are hardly visualized after commit(disappearing of the presentation by leaving viewer). These feature are visualized on commit. The fillet can not be visualilzed because data() is invalid. --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 015257489..3ccdbf563 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -784,9 +784,14 @@ void PartSet_SketcherMgr::stopNestedSketch(ModuleBase_Operation* theOp) void PartSet_SketcherMgr::commitNestedSketch(ModuleBase_Operation* theOperation) { - if (isNestedCreateOperation(theOperation)) - visualizeFeature(theOperation, true); - + if (isNestedCreateOperation(theOperation)) { + FeaturePtr aFeature = theOperation->feature(); + // it is necessary to check the the feature data validity because + // some kind of features are removed by an operation commit(the macro state of a feature) + if (aFeature.get() && aFeature->data()->isValid()) { + visualizeFeature(theOperation, true); + } + } } bool PartSet_SketcherMgr::canUndo() const diff --git a/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp b/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp index bcee3fe0d..f120e596e 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp @@ -309,7 +309,7 @@ AISObjectPtr SketchPlugin_ConstraintFillet::getAISObject(AISObjectPtr thePreviou bool SketchPlugin_ConstraintFillet::isMacro() const { - return false; + return true; }