From 12fd8bfbd71aa0ca2eb987b8d1bf6f40f8aaec75 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 27 May 2015 20:57:26 +0300 Subject: [PATCH] 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. --- src/PartSet/PartSet_SketcherMgr.cpp | 11 ++++++++--- src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) 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; } -- 2.39.2