]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_WidgetPoint2d.cpp
Salome HOME
#1182 point is attched to Sketch Constraint line
[modules/shaper.git] / src / PartSet / PartSet_WidgetPoint2d.cpp
index e8555daed568bdede8f07571dcff437dc0255852..d34128d1643ab53de997642e8847f87117f56109 100644 (file)
@@ -359,8 +359,8 @@ void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMous
   NCollection_List<TopoDS_Shape> aShapes;
   std::list<ObjectPtr> aObjects;
   aSelection->selectedShapes(aShapes, aObjects);
-  // if we have selection
-  if (aShapes.Extent() > 0) {
+  // if we have selection and use it
+  if (aShapes.Extent() > 0 && useSelectedShapes()) {
     TopoDS_Shape aShape = aShapes.First();
     ObjectPtr aObject = aObjects.front();
     FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(aObject);
@@ -541,6 +541,11 @@ bool PartSet_WidgetPoint2D::processEnter()
   return isModified;
 }
 
+bool PartSet_WidgetPoint2D::useSelectedShapes() const
+{
+  return true;
+}
+
 bool PartSet_WidgetPoint2D::isOrphanPoint(const FeaturePtr& theFeature,
                                           const CompositeFeaturePtr& theSketch,
                                           double theX, double theY)