+ double aX=0, aY=0;
+ bool aHasPoint = false;
+ if (aFirstValue.get()) {
+ GeomShapePtr aShape = aFirstValue->shape();
+ if (aShape.get() && aShape->shapeType() == GeomAPI_Shape::VERTEX) {
+ const TopoDS_Shape& aTDShape = aShape->impl<TopoDS_Shape>();
+ GeomPnt2dPtr aPnt = PartSet_Tools::getPnt2d(aView, aTDShape, mySketch);
+ aX = aPnt->x();
+ aY = aPnt->y();
+ aHasPoint = true;
+ }
+ }
+ if (!aHasPoint) {
+ gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), aView);
+ PartSet_Tools::convertTo2D(aPoint, mySketch, aView, aX, aY);
+ }
+ processSelection(aFirstValue, aX, aY);
+}
+
+void PartSet_WidgetPoint2D::processSelection(const ModuleBase_ViewerPrsPtr& theValue,
+ double theX, double theY)
+{
+ if (!setPoint(theX, theY))
+ return;