From 6bad26cf6653420b2a3315c36f821bffe96c0e1a Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 2 Oct 2013 10:45:18 +0000 Subject: [PATCH] Debug. --- src/CurveCreator/CurveCreator_Widget.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/CurveCreator/CurveCreator_Widget.cxx b/src/CurveCreator/CurveCreator_Widget.cxx index ed1fb08bb..961eb6d41 100644 --- a/src/CurveCreator/CurveCreator_Widget.cxx +++ b/src/CurveCreator/CurveCreator_Widget.cxx @@ -776,12 +776,15 @@ void CurveCreator_Widget::onMousePress( SUIT_ViewWindow* theViewWindow, QMouseEv else ic->Select(); // New selection + TopoDS_Shape aShape; + ic->InitSelected(); - if ( ic->MoreSelected() ) { - TopoDS_Shape aShape = ic->SelectedShape(); - if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) - aPnt = BRep_Tool::Pnt( TopoDS::Vertex( ic->SelectedShape() ) ); - } else { + if ( ic->MoreSelected() ) + aShape = ic->SelectedShape(); + + if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) + aPnt = BRep_Tool::Pnt( TopoDS::Vertex( ic->SelectedShape() ) ); + else { OCCViewer_ViewPort3d* vp = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort(); aPnt = GEOMUtils::ConvertClickToPoint( pe->x(), pe->y(), vp->getView() ); } -- 2.39.2