Salome HOME
Issues #2027, #2024, #2063, #2067: reentrant message to fill new operation by result...
[modules/shaper.git] / src / PartSet / PartSet_WidgetFeaturePointSelector.cpp
index e8c4abf8c71a1f949d7d5bca8e6ace9640e30e1a..0fecb7ed7855e535d11dfc007a7ffe30e5565f84 100644 (file)
@@ -170,11 +170,6 @@ bool PartSet_WidgetFeaturePointSelector::fillFeature(
   if (!anObject.get())
     return aFilled;
 
-  gp_Pnt aPnt = PartSet_Tools::convertClickToPoint(theEvent->pos(), theWindow->v3dView());
-  double aX, anY;
-  Handle(V3d_View) aView = theWindow->v3dView();
-  PartSet_Tools::convertTo2D(aPnt, mySketch, aView, aX, anY);
-
   std::shared_ptr<ModelAPI_AttributeReference> aRef =
                           std::dynamic_pointer_cast<ModelAPI_AttributeReference>(
                           feature()->data()->attribute(SketchPlugin_Trim::PREVIEW_OBJECT()));
@@ -183,7 +178,8 @@ bool PartSet_WidgetFeaturePointSelector::fillFeature(
   std::shared_ptr<GeomDataAPI_Point2D> anAttributePoint =
                   std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
                   feature()->data()->attribute(SketchPlugin_Trim::PREVIEW_POINT()));
-  anAttributePoint->setValue(aX, anY);
+  std::shared_ptr<GeomAPI_Pnt2d> aPoint = PartSet_Tools::getPnt2d(theEvent, theWindow, mySketch);
+  anAttributePoint->setValue(aPoint);
   // redisplay AIS presentation in viewer
 #ifndef HIGHLIGHT_STAYS_PROBLEM
   // an attempt to clear highlighted item in the viewer: but of OCCT