]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Hide menu actions for inactive (hidden) OCC sub-windows
authorvsr <vsr@opencascade.com>
Wed, 27 Apr 2011 05:29:18 +0000 (05:29 +0000)
committervsr <vsr@opencascade.com>
Wed, 27 Apr 2011 05:29:18 +0000 (05:29 +0000)
src/OCCViewer/OCCViewer_ViewModel.cxx

index de5086a991c7df10c3b6ad5ae7fb4e1fd6db5927..2dbda9e742890992ca90d80ca8e4edf83a5aa2d5 100755 (executable)
@@ -418,8 +418,10 @@ void OCCViewer_Viewer::contextMenuPopup(QMenu* thePopup)
   //Support of several toolbars in the popup menu
   QList<QToolBar*> lst = qFindChildren<QToolBar*>( aView );
   QList<QToolBar*>::const_iterator it = lst.begin(), last = lst.end();
-  for( ; it!=last; it++ )
-    thePopup->addAction( (*it)->toggleViewAction() );
+  for ( ; it!=last; it++ ) {
+    if ( (*it)->parentWidget()->isVisible() )
+      thePopup->addAction( (*it)->toggleViewAction() );
+  }
 }
 
 /*!