Salome HOME
Fix for bug PAL8110 : PAL-SUPRV-004: "Supervisor Warning" message box misses.
authormkr <mkr@opencascade.com>
Thu, 29 Sep 2005 11:23:37 +0000 (11:23 +0000)
committermkr <mkr@opencascade.com>
Thu, 29 Sep 2005 11:23:37 +0000 (11:23 +0000)
src/SUPERVGUI/SUPERVGUI.cxx
src/SUPERVGUI/SUPERVGUI_CanvasPort.cxx

index 756bb201741720ee7b39c1a6a1a5a4c576e5c7dd..8c8886df04e84a00865fd49901022279ca662ab2 100644 (file)
@@ -552,8 +552,11 @@ void SUPERVGUI::exportDataflow() {
         QString aBackupFile = SUPERVGUI::createBackupFile( f );
 
         if ( main->getDataflow()->Export(f.latin1()) ) {
-          unregisterGraph(main);
-          registerGraph(f, main);
+         // mkr : PAL8110 : if we re-register graph with its xml-file name the "Supervisor Warning"
+         //       after object browser popup "Display" item will not appear, it's an error,
+         //       because of this dataflow is already displayed.
+          //unregisterGraph(main);
+          //registerGraph(f, main);
 
           // remove a backup file if export was successfull
           if ( !aBackupFile.isNull() && !aBackupFile.isEmpty() )
index 72196a4f3571508d2855ccc88b9883e6a026aee7..8274ca96bc9b49a57c437f9c0e7e68e8bf3768d8 100644 (file)
@@ -305,7 +305,17 @@ void SUPERVGUI_CanvasPortOut::toStudy()
   getMain()->getCanvas()->update();
 
   if ( myInStudy ) // put values to study (supervision, supervision->dataflow, supervision->dataflow->runXXX, etc.
-    getMain()->putDataStudy( getEngine(), STUDY_PORT_OUT ); 
+    if ( getMain()->putDataStudy( getEngine(), STUDY_PORT_OUT ) ) {
+      // mkr : PAL8110 : re-register dataflow in object browser with 
+      //       changing its key to IOR name (from xml-file name, for example)
+      SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
+      if ( !aSupMod ) {
+       MESSAGE("NULL Supervision module!");
+       return;
+      }
+      aSupMod->unregisterGraph(getMain());
+      aSupMod->registerGraph(getMain()->getDataflow()->getIOR(), getMain());
+    }
 }