X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_SketcherMgr.cpp;h=a6ae7a8a5bcb4f656210a239a4d08275dbb4878f;hb=0b503091623876eda1ae9214e32f8831ef03778b;hp=b55c62ad1eb5c63f1ef43177af02c643d176db02;hpb=0c0573f4321deb94f9c5d3182a34fb672cc6e1f0;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index b55c62ad1..a6ae7a8a5 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -48,6 +48,10 @@ #include #include #include +#include +#include +#include +#include #include #include @@ -578,6 +582,10 @@ QStringList PartSet_SketcherMgr::sketchOperationIdList() aIds << SketchPlugin_ConstraintRadius::ID().c_str(); aIds << SketchPlugin_ConstraintPerpendicular::ID().c_str(); aIds << SketchPlugin_ConstraintParallel::ID().c_str(); + aIds << SketchPlugin_ConstraintHorizontal::ID().c_str(); + aIds << SketchPlugin_ConstraintVertical::ID().c_str(); + aIds << SketchPlugin_ConstraintEqual::ID().c_str(); + aIds << SketchPlugin_ConstraintTangent::ID().c_str(); } return aIds; } @@ -772,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(); @@ -793,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(); } } } @@ -846,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); } } }