Salome HOME
Merge remote-tracking branch 'origin/BR_v14_rc' into BR_SHAPE_RECOGNITION
authormzn <mzn@opencascade.com>
Mon, 25 May 2015 12:24:40 +0000 (15:24 +0300)
committermzn <mzn@opencascade.com>
Mon, 25 May 2015 12:24:40 +0000 (15:24 +0300)
src/HYDROGUI/HYDROGUI_Module.cxx
src/HYDROGUI/HYDROGUI_Polyline.cxx

index 4147c74cdeff292c44a0cd479294541245c6dd9b..cbed2b66dc1943b3c443b75712ee31a944c3078e 100644 (file)
@@ -711,13 +711,16 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
 
   if( anIsObjectBrowser && anOwners.size()==1 )
   {
-    Handle( HYDROData_Object ) anObject = Handle( HYDROData_Object )::DownCast( aSeq.First() );
-    if( !anObject.IsNull() )
+    if( aSeq.Size() > 0 )
     {
-      theMenu->addSeparator();
-      theMenu->addAction( action( SubmersibleId ) );
-      action( SubmersibleId )->setCheckable( true );
-      action( SubmersibleId )->setChecked( anObject->IsSubmersible() );
+      Handle( HYDROData_Object ) anObject = Handle( HYDROData_Object )::DownCast( aSeq.First() );
+      if( !anObject.IsNull() )
+      {
+        theMenu->addSeparator();
+        theMenu->addAction( action( SubmersibleId ) );
+        action( SubmersibleId )->setCheckable( true );
+        action( SubmersibleId )->setChecked( anObject->IsSubmersible() );
+      }
     }
   }
 }
index e624cb3dbd402c3d2fe568a9cb2f04c175436224..7d312cb56d6c75b55e674507463c87bd1c4afbd1 100644 (file)
@@ -123,7 +123,7 @@ void HYDROGUI_Polyline::Compute(const Handle(PrsMgr_PresentationManager3d)& aPre
       aDir = D;
     }
     else
-      C->D1(aMaxRatioStep, C->Value (aMaxRatioStep), aDir);
+      C->D1(aMaxRatioStep, aPnt1, aDir);
   
     if ( anEdge.Orientation() == TopAbs_REVERSED )
       aDir = -aDir;