]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Debug.
authorouv <ouv@opencascade.com>
Wed, 2 Oct 2013 10:45:18 +0000 (10:45 +0000)
committerouv <ouv@opencascade.com>
Wed, 2 Oct 2013 10:45:18 +0000 (10:45 +0000)
src/CurveCreator/CurveCreator_Widget.cxx

index ed1fb08bb1ded3c02f8f51d5555acb6c4fac526b..961eb6d41b55f6cf56ccb2ba2490f1fccc3c74b3 100644 (file)
@@ -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() );
     }