X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_Module.cxx;h=cbed2b66dc1943b3c443b75712ee31a944c3078e;hb=a53349567d67f4df0ef737798a25c24d9dc8f08e;hp=4147c74cdeff292c44a0cd479294541245c6dd9b;hpb=ed7a9d24abef6457c7eb94db703c57b0406df3d6;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index 4147c74c..cbed2b66 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -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() ); + } } } }