- boost::shared_ptr<ModelAPI_Feature> aFeature = ModuleBase_Operation::createFeature();
- emit featureConstructed(aFeature, FM_Activation);
- return aFeature;
+ //TODO: Define position of selection modes definition
+ std::list<int> aModes;
+ FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theFeature);
+ if (aFeature && PartSet_Tools::isConstraintFeature(aFeature->getKind())) {
+ aModes.push_back(AIS_DSM_Text);
+ aModes.push_back(AIS_DSM_Line);
+ } else {
+ aModes.push_back(AIS_Shape::SelectionMode((TopAbs_ShapeEnum) TopAbs_VERTEX));
+ aModes.push_back(AIS_Shape::SelectionMode((TopAbs_ShapeEnum) TopAbs_EDGE));
+ }
+ return aModes;
+}
+FeaturePtr PartSet_OperationSketchBase::createFeature(const bool theFlushMessage)
+{
+ ModuleBase_Operation::createFeature(theFlushMessage);
+ if (myFeature)
+ emit featureConstructed(myFeature, FM_Activation);
+ return myFeature;