]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fillet is macro, that means that this feature is deleted on commit of the operation.
authornds <natalia.donis@opencascade.com>
Wed, 27 May 2015 17:57:26 +0000 (20:57 +0300)
committernds <natalia.donis@opencascade.com>
Wed, 27 May 2015 17:57:26 +0000 (20:57 +0300)
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.

src/PartSet/PartSet_SketcherMgr.cpp
src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp

index 015257489767fe0e15f2e320e42e03720c40d58b..3ccdbf5630c3ed91d3e4eff70c317bd8886c1fc2 100644 (file)
@@ -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
index bcee3fe0d551e3b04df9a348357f615132c493ce..f120e596e15687be078874b54038f0c3004d209d 100644 (file)
@@ -309,7 +309,7 @@ AISObjectPtr SketchPlugin_ConstraintFillet::getAISObject(AISObjectPtr thePreviou
 
 bool SketchPlugin_ConstraintFillet::isMacro() const
 {
-  return false;
+  return true;
 }