]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Issue 0001138: External 20348 View operation
authorouv <ouv@opencascade.com>
Thu, 30 Aug 2012 10:04:23 +0000 (10:04 +0000)
committerouv <ouv@opencascade.com>
Thu, 30 Aug 2012 10:04:23 +0000 (10:04 +0000)
src/GLViewer/GLViewer_Viewer.cxx

index da6e8ac6158ca00a4994d3151d759886ee1f97d5..ad68bc5e20b100c4cd7d5387e87adbf6c99acdbd 100644 (file)
@@ -39,6 +39,7 @@
 #include <QWheelEvent>
 #include <QRect>
 #include <QRubberBand>
+#include <QToolBar>
 
 /* used for sketching */
 static QEvent* l_mbPressEvent = 0;
@@ -95,6 +96,17 @@ void GLViewer_Viewer::contextMenuPopup( QMenu* thePopup )
       thePopup->addSeparator();
 
   thePopup->addAction( tr( "CHANGE_BGCOLOR" ), this, SLOT( onChangeBgColor() ) );
+
+  thePopup->addSeparator();
+
+  if( GLViewer_ViewFrame* aView = getActiveView() )
+  {
+    QList<QToolBar*> aList = qFindChildren<QToolBar*>( aView );
+    QListIterator<QToolBar*> anIter( aList );
+    while( anIter.hasNext() )
+      if( QToolBar* aToolBar = anIter.next() )
+        thePopup->addAction( aToolBar->toggleViewAction() );
+  }
 }
 
 /*!