From: asl Date: Mon, 25 May 2015 11:57:25 +0000 (+0300) Subject: patch for regression in popup menu construction X-Git-Tag: v1.4.1~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8c8fe60239ebac5e5acc9e633ea9b1b29455d1f8;p=modules%2Fhydro.git patch for regression in popup menu construction --- diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index 1ed020f8..283f361e 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -709,13 +709,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() ); + } } } }