Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_CanvasNodePrs.cxx
index 6f03a189458a5976921bb8d9cd096999c77a616f..c5d107df1af309255346fb8becba5789ed54c315 100644 (file)
@@ -1,6 +1,23 @@
 //  SUPERV SUPERVGUI : GUI for Supervisor component
 //
-//  Copyright (C) 2003  OPEN CASCADE
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //  File   : SUPERVGUI_GanvasNodePrs.cxx
 //  Author : Natalia KOPNOVA
@@ -760,7 +777,10 @@ void SUPERVGUI_CanvasNodePrs::setState(SUPERV::GraphState theState)
     break;
   }
 
-  long sec = myNode->getEngine()->CpuUsed();
+  long sec = 0;
+  // IPAL9273, 9369, 9731
+  if ( theState != SUPERV_Kill && myNode->getMain()->getDataflow()->State() != SUPERV_Kill )
+    sec = myNode->getEngine()->CpuUsed();
   char hms[9];
   long s = sec/3600;
   hms[0]=(char)(((s/10)%10)+48);
@@ -887,8 +907,18 @@ QString SUPERVGUI_CanvasPortPrs::getText() const
   QString aText;
   if ( !CORBA::is_nil( aPort ) ) {
     aText = aPort->Name();
-    if (aPort->IsParam() || aPort->IsInLine() || myPort->isStream())
-      aText = aText + "=" + aPort->ToString();
+    if (aPort->IsParam() || aPort->IsInLine() || myPort->isStream()) {
+      // mkr : modifications to avoid displaying long IOR's values on nodes' ports,
+      //       display ports type from corresponding XML catalog instead.
+      QString aPortValue = aPort->ToString();
+      QString aPortType = aPort->Type();
+      if ( aPortType.compare("string") // not "string" type
+          &&
+          aPortValue.find("IOR:") >= 0 ) // has IOR:... in value
+       aText = aText + "=" + aPortType;
+      else
+       aText = aText + "=" + aPortValue;
+    }
   }
   //  printf( "--- return text of port : %s ---\n", aText.latin1() );
   return aText;