+std::list<int> PartSet_OperationSketch::getSelectionModes(boost::shared_ptr<ModelAPI_Feature> theFeature) const
+{
+ std::list<int> aModes;
+ if (!myIsEditMode)
+ aModes.push_back(TopAbs_FACE);
+ else {
+ aModes.push_back(TopAbs_VERTEX);
+ aModes.push_back(TopAbs_EDGE);
+ }
+ return aModes;
+}
+
+void PartSet_OperationSketch::mouseReleased(QMouseEvent* theEvent, Handle_V3d_View theView,
+ const std::list<XGUI_ViewerPrs>& theSelected)
+{
+ if (theSelected.empty())
+ return;
+
+ if (!myIsEditMode) {
+ XGUI_ViewerPrs aPrs = theSelected.front();
+ const TopoDS_Shape& aShape = aPrs.shape();
+ if (!aShape.IsNull()) {
+ setSketchPlane(aShape);
+ myIsEditMode = true;
+ }
+ }
+}
+
+void PartSet_OperationSketch::mouseMoved(QMouseEvent* theEvent, Handle(V3d_View) theView,
+ const std::list<XGUI_ViewerPrs>& theSelected)