From 909b4e638a57729bbebc747eca896137793768d5 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 20 Mar 2015 12:38:54 +0300 Subject: [PATCH] Construction bug fix: the current operation should not be aborted on the popup menu build. --- src/PartSet/PartSet_SketcherMgr.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 64b07a1ee..a6ae7a8a5 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -780,8 +780,10 @@ bool PartSet_SketcherMgr::canSetAuxiliary(bool& theValue) const anObjects.append(anOperation->feature()); } else { - if (PartSet_SketcherMgr::isNestedSketchOperation(anOperation)) - anOperation->abort(); + /// The operation should not be aborted here, because the method does not changed + /// the auxilliary state, but checks the possibility to perform this + ///if (PartSet_SketcherMgr::isNestedSketchOperation(anOperation)) + /// anOperation->abort(); // 2. change auxiliary type of selected sketch entities ModuleBase_ISelection* aSelection = myModule->workshop()->selection(); anObjects = aSelection->selectedPresentations(); @@ -801,7 +803,8 @@ bool PartSet_SketcherMgr::canSetAuxiliary(bool& theValue) const std::shared_ptr anAuxiliaryAttr = std::dynamic_pointer_cast(aSketchFeature->data()->attribute(anAttribute)); - isNotAuxiliaryFound = !anAuxiliaryAttr->value(); + if (anAuxiliaryAttr) + isNotAuxiliaryFound = !anAuxiliaryAttr->value(); } } } @@ -854,7 +857,8 @@ void PartSet_SketcherMgr::setAuxiliary(const bool isChecked) std::shared_ptr anAuxiliaryAttr = std::dynamic_pointer_cast(aSketchFeature->data()->attribute(anAttribute)); - anAuxiliaryAttr->setValue(isChecked); + if (anAuxiliaryAttr) + anAuxiliaryAttr->setValue(isChecked); } } } -- 2.39.2