Salome HOME
Fixes for bugs PAL7846, PAL7987. "Add dataflow in Study", "Put out-port value to...
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_ArrayView.cxx
index 16561b0555db6329549e64ac5909e90b5859ab8d..b2b0309cdeedef948b0e6b16eb1c59efc15d1b94 100644 (file)
@@ -60,7 +60,7 @@ SUPERVGUI_ArrayView::SUPERVGUI_ArrayView(SUPERVGUI_CanvasArray* theArray, SUPERV
   myPopup->insertItem("Zoom", aZoomPopup);
   myPopup->insertSeparator();*/
 
-  myAddStudyItem = myPopup->insertItem(tr("MSG_ADD_STUDY"), this, SLOT(addToStudy()));
+  myAddStudyItem = myPopup->insertItem(tr("MSG_ADD_STUDY"), myMain, SLOT(addDataflowToStudy()));
   myPopup->insertItem(tr("MSG_CHANGE_INFO"), myMain, SLOT(changeInformation()));
   myPopup->insertSeparator();
 
@@ -91,11 +91,6 @@ void SUPERVGUI_ArrayView::ResetView()
   setWorldMatrix(m);
 }
 
-void SUPERVGUI_ArrayView::addToStudy() 
-{
-  if (myMain->addStudy()) myMain->setAsFromStudy(true);
-}
-
 void SUPERVGUI_ArrayView::changeBackground()
 {
   QColor aColor = QColorDialog::getColor(canvas()->backgroundColor(), this );
@@ -137,7 +132,7 @@ void SUPERVGUI_ArrayView::contentsMousePressEvent(QMouseEvent* theEvent) {
       }
     }
 
-    myPopup->setItemEnabled(myAddStudyItem, !myMain->isFromStudy());
+    myPopup->setItemEnabled(myAddStudyItem, !myMain->isDataflowInStudy());
     myMain->showPopup(myPopup, theEvent);
     return;
   }