Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / PartSet / PartSet_Tools.cpp
index ca6b10adbdb8d105719c93f9674978e34d4c982c..24a726a90df03bf938282248b2ab5637556dc8c4 100644 (file)
@@ -27,7 +27,7 @@
 #include <SketchPlugin_ConstraintRadius.h>
 #include <SketchPlugin_Constraint.h>
 
-#include <XGUI_ViewerPrs.h>
+#include <ModuleBase_ViewerPrs.h>
 
 #include <V3d_View.hxx>
 #include <gp_Pln.hxx>
@@ -138,31 +138,31 @@ void PartSet_Tools::convertTo3D(const double theX, const double theY,
 
 FeaturePtr PartSet_Tools::nearestFeature(QPoint thePoint, Handle_V3d_View theView,
                                          FeaturePtr theSketch,
-                                         const std::list<XGUI_ViewerPrs>& theFeatures)
+                                         const std::list<ModuleBase_ViewerPrs>& theFeatures)
 {
   double aX, anY;
   gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(thePoint, theView);
   PartSet_Tools::convertTo2D(aPoint, theSketch, theView, aX, anY);
 
   FeaturePtr aFeature;
-  std::list<XGUI_ViewerPrs>::const_iterator anIt = theFeatures.begin(), aLast = theFeatures.end();
+  std::list<ModuleBase_ViewerPrs>::const_iterator anIt = theFeatures.begin(), aLast = theFeatures.end();
 
   FeaturePtr aDeltaFeature;   
   double aMinDelta = -1;
-  XGUI_ViewerPrs aPrs;
+  ModuleBase_ViewerPrs aPrs;
   for (; anIt != aLast; anIt++) {
     aPrs = *anIt;
-    if (!aPrs.feature())
+    if (!aPrs.result())
       continue;
     boost::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
-                           boost::dynamic_pointer_cast<SketchPlugin_Feature>(aPrs.feature());
+                           boost::dynamic_pointer_cast<SketchPlugin_Feature>(aPrs.result());
     if (!aSketchFeature)
       continue;
     double aDelta = aSketchFeature->distanceToPoint(
                                boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, anY)));
     if (aMinDelta < 0 || aMinDelta > aDelta) {
       aMinDelta = aDelta;
-      aDeltaFeature = aPrs.feature();
+      aDeltaFeature = aPrs.result();
     }
   }
   return aDeltaFeature;