From: ouv Date: Wed, 2 Oct 2013 10:45:18 +0000 (+0000) Subject: Debug. X-Git-Tag: BR_hydro_v_0_3~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6bad26cf6653420b2a3315c36f821bffe96c0e1a;p=modules%2Fgeom.git Debug. --- 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() ); }