]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Correction for bugs 666, 667,678,670 - crash in Sketcher Prs peformed by VSA
authornds <natalia.donis@opencascade.com>
Fri, 26 Jun 2015 05:01:39 +0000 (08:01 +0300)
committernds <natalia.donis@opencascade.com>
Fri, 26 Jun 2015 05:16:36 +0000 (08:16 +0300)
src/SketcherPrs/SketcherPrs_SensitivePoint.cpp
src/SketcherPrs/SketcherPrs_SensitivePoint.h

index 26e5d6b5169265cde144a5c87caf8733e34728b3..0785b8415071c9d5f21933a76dc3129f6b2dbbf1 100644 (file)
@@ -39,15 +39,11 @@ Standard_Boolean SketcherPrs_SensitivePoint::Matches (SelectBasics_SelectingVolu
 
 gp_Pnt SketcherPrs_SensitivePoint::Point() const
 {
-  gp_Pnt aPoint(0, 0, 0);
   const Handle(SelectMgr_EntityOwner)& anOwner =
     Handle(SelectMgr_EntityOwner)::DownCast(OwnerId());
-  if (!anOwner.IsNull()) {
-    const Handle(SketcherPrs_SymbolPrs)& aSymbPrs =
-      Handle(SketcherPrs_SymbolPrs)::DownCast(anOwner->Selectable());
-    aPoint = aSymbPrs->pointsArray()->Vertice(myId);
-  }
-  return aPoint;
+  const Handle(SketcherPrs_SymbolPrs)& aSymbPrs =
+    Handle(SketcherPrs_SymbolPrs)::DownCast(anOwner->Selectable());
+  return aSymbPrs->pointsArray()->Vertice(myId);
 }
 
 Handle(Select3D_SensitiveEntity) SketcherPrs_SensitivePoint::GetConnected()
@@ -72,3 +68,8 @@ Standard_Integer SketcherPrs_SensitivePoint::NbSubElements()
 {
   return 1;
 }
+
+void SketcherPrs_SensitivePoint::Clear()
+{
+  return;
+}
index 408bec8e4887034f1e34bdbe5386709303d0aeba..033b81a0dabd7c8e1d18bd479d0fa23b45db7025 100644 (file)
@@ -45,7 +45,8 @@ public:
   //! Returns bounding box of the point. If location
   //! transformation is set, it will be applied
   Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
-  
+
+  Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTI(SketcherPrs_SensitivePoint)