Salome HOME
SALOME PAL V1_4_1
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI.cxx
index 142ee04470c5f92786231fca00f633ce58daf1b7..394710b9da2e466cecf82190236295ca85ebec8d 100644 (file)
@@ -91,6 +91,10 @@ void SUPERVGUI::init(QAD_Desktop* parent) {
         //info    = new SUPERVGUI_Information();
         cursor  = desktop->cursor();
        connect(desktop->getMainFrame(), SIGNAL(windowActivated(QWidget*)), this, SLOT(setMain(QWidget*)));
+
+       int anId = 300;
+       parent->menuBar()->changeItem(anId,parent->getComponentUserName("SUPERV"));
+       
     };
 }
 
@@ -100,7 +104,7 @@ QAD_StudyFrame* SUPERVGUI::createGraph() {
                                                   VIEW_GRAPHSUPERV, false);
   if (aStudyFrame) {
     connect(aStudyFrame, 
-           SIGNAL(sfBeforeStudyFrameClosing(QAD_StudyFrame*)), 
+           SIGNAL(sfStudyFrameClosing(QAD_StudyFrame*)), 
            &Supervision, 
            SLOT(onGraphClosed(QAD_StudyFrame*)));
   }
@@ -120,7 +124,7 @@ void SUPERVGUI::loadEngine(SALOME_NamingService* namingService) {
 
     SUPERV::SuperG_var aSuperVisionComponent;
     aSuperVisionComponent = SUPERV::SuperG::_narrow(objComponent);
-    if (CORBA::is_nil(aSuperVisionComponent)) { 
+    if (CORBA::is_nil(aSuperVisionComponent)) {
         QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_NARROW_SUPERV"));
         return;
     };
@@ -509,8 +513,8 @@ void SUPERVGUI::whatIsSelected(const Handle(SALOME_InteractiveObject)& theObj, b
       if (comp->FindAttribute(anAttr, "AttributeName")) {
        aName = SALOMEDS::AttributeName::_narrow(anAttr);
        QString compName(aName->Value());
-       //      if (compName.compare(STUDY_SUPERVISION) == 0) {
-       if (compName.compare( QAD_Application::getDesktop()->getComponentUserName( "SUPERV" ) ) == 0) {
+       //if (compName.compare(STUDY_SUPERVISION) == 0) {
+       if (compName.compare(QAD_Application::getDesktop()->getComponentUserName("SUPERV")) == 0) {
          SALOMEDS::GenericAttribute_var anAttr;
          if (obj->FindAttribute(anAttr, "AttributeIOR")) {
            SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
@@ -671,3 +675,7 @@ extern "C" int supportedViewType()
 {
   return (int)VIEW_GRAPHSUPERV;
 }
+
+extern "C" void buildPresentation ( const Handle(SALOME_InteractiveObject)& theIO )
+{
+}