Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_Information.cxx
index b2fe0b2eaadb6603e2c0f8986a833c703a355271..745226885816a9b25b20d71b50a2516bd20265dd 100644 (file)
@@ -25,8 +25,8 @@
 //  Author : Francis KLOSS
 //  Module : SUPERV
 
-using namespace std;
 #include "SUPERVGUI_Information.h"
+#include "SUPERVGUI.h"
 
 #include "CAM_Application.h"
 #include "SUIT_Desktop.h"
@@ -37,7 +37,6 @@ using namespace std;
 #include <qgroupbox.h>
 #include <qlayout.h>
 
-
 /*!
   Constructor
 */
@@ -84,14 +83,13 @@ SUPERVGUI_Information::SUPERVGUI_Information(SUPERV_CNode node, bool isReadOnly)
     contV->setMinimumSize( 200, 0 );
     contV->setReadOnly( false/*isReadOnly*/ );
     contV->setText( SUPERV::FNode::_narrow(node)->GetContainer() );
-    
+
     compnameL = new QLabel( tr( "COMPONENT_NAME_LBL" ), TopGroup ); 
     compnameV = new QLineEdit( TopGroup );      
     compnameV->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
     compnameV->setMinimumSize( 200, 0 );
     compnameV->setReadOnly( true/*isReadOnly*/ );
-    compnameV->setText( dynamic_cast<CAM_Application*>( SUIT_Session::session()->activeApplication() )->
-                       moduleTitle(SUPERV::FNode::_narrow(node)->GetComponentName()) );
+    compnameV->setText( SUPERV::FNode::_narrow(node)->GetComponentName() ); // mkr : IPAL10198
 
     intnameL = new QLabel( tr( "INTERFACE_NAME_LBL" ), TopGroup ); 
     intnameV = new QLineEdit( TopGroup );      
@@ -99,7 +97,7 @@ SUPERVGUI_Information::SUPERVGUI_Information(SUPERV_CNode node, bool isReadOnly)
     intnameV->setMinimumSize( 200, 0 );
     intnameV->setReadOnly( true/*isReadOnly*/ );
     intnameV->setText( SUPERV::FNode::_narrow(node)->GetInterfaceName() );
-    
+
   }
   QLabel* cdatL = new QLabel( tr( "DATE_CREATION_LBL" ), TopGroup ); 
   cdatV = new QLabel( TopGroup );
@@ -280,11 +278,18 @@ void SUPERVGUI_Information::okButton() {
   Trace("SUPERVGUI_Information::okButton");
   //mkr : modifications for fixing bug IPAL9972
   bool aIsAccept = true;
-  if ( QString( myNode->Name() ).compare( nameV->text() ) != 0 )
+  if ( QString( myNode->Name() ).compare( nameV->text() ) != 0 ) {
     if ( !myNode->SetName( nameV->text().latin1()) ) {
       QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr( "ERROR" ), tr( "MSG_CANT_RENAMENODE" ) );
       aIsAccept = false;
     }
+    // mkr : PAL7037 => update dataflow name in object browser if this dialog called for the dataflow and the dataflow is in study -->
+    if ( myNode->IsGraph() || myNode->IsStreamGraph() ) {
+      SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
+      if ( aSupMod ) aSupMod->updateDataFlowSOName(SUPERV::Graph::_narrow(myNode));
+    }
+    // mkr : PAL7037 <--
+  }
   myNode->SetAuthor( authV->text().latin1() );
   if (myNode->IsFactory()) {
     SUPERV_FNode aFNode = SUPERV::FNode::_narrow(myNode);