Salome HOME
Fix for IPAL10387 ( Supervisor viewer has no "View Operations" toolbar ) :
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_ArrayView.cxx
index de53d8c3ed88212557ce7c55d15679e832e363c3..b8c2be47d487280da4787b8b39afc49f371c4ff5 100644 (file)
@@ -69,7 +69,13 @@ SUPERVGUI_ArrayView::SUPERVGUI_ArrayView(SUPERVGUI_CanvasArray* theArray, SUPERV
 
   myPopup->insertSeparator();
   myPopup->insertItem(tr("MSG_CHANGE_BACKGROUND"), this, SLOT(changeBackground()));
+
+  SUPERVGraph_ViewFrame* anActiveVF = (SUPERVGraph_ViewFrame*)myMain->parent();
+  if ( anActiveVF ) {
+    myPopup->insertSeparator();
+    myShowToolBarItem = myPopup->insertItem( tr( "MEN_SHOW_TOOLBAR" ), myMain, SLOT( onShowToolbar() ) );
+  }
+
   hide();
 }
  
@@ -143,6 +149,7 @@ void SUPERVGUI_ArrayView::contentsMousePressEvent(QMouseEvent* theEvent) {
     }
 
     myPopup->setItemEnabled(myAddStudyItem, !myMain->isDataflowInStudy());
+    myPopup->setItemEnabled(myShowToolBarItem, !((SUPERVGraph_ViewFrame*)myMain->parent())->getToolBar()->isVisible());
     myMain->showPopup(myPopup, theEvent);
     return;
   }