From 8c8fe60239ebac5e5acc9e633ea9b1b29455d1f8 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 25 May 2015 14:57:25 +0300 Subject: [PATCH] patch for regression in popup menu construction --- src/HYDROGUI/HYDROGUI_Module.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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() ); + } } } } -- 2.39.2