From cba97dd911667d457ee46e0d9ef6c5b63d8e3f6a Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 27 Apr 2011 05:29:18 +0000 Subject: [PATCH] Hide menu actions for inactive (hidden) OCC sub-windows --- src/OCCViewer/OCCViewer_ViewModel.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index de5086a99..2dbda9e74 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -418,8 +418,10 @@ void OCCViewer_Viewer::contextMenuPopup(QMenu* thePopup) //Support of several toolbars in the popup menu QList lst = qFindChildren( aView ); QList::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() ); + } } /*! -- 2.39.2