From 208955b386a2e3831a563abd22d26aa79ac20699 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 26 Jun 2015 08:01:39 +0300 Subject: [PATCH] Correction for bugs 666, 667,678,670 - crash in Sketcher Prs peformed by VSA --- src/SketcherPrs/SketcherPrs_SensitivePoint.cpp | 15 ++++++++------- src/SketcherPrs/SketcherPrs_SensitivePoint.h | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp b/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp index 26e5d6b51..0785b8415 100644 --- a/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp +++ b/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp @@ -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; +} diff --git a/src/SketcherPrs/SketcherPrs_SensitivePoint.h b/src/SketcherPrs/SketcherPrs_SensitivePoint.h index 408bec8e4..033b81a0d 100644 --- a/src/SketcherPrs/SketcherPrs_SensitivePoint.h +++ b/src/SketcherPrs/SketcherPrs_SensitivePoint.h @@ -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) -- 2.39.2