Salome HOME
Modifications to avoid displaying long IOR's values on nodes' ports, T3_2_0b1 V3_2_0b1
authormkr <mkr@opencascade.com>
Thu, 11 May 2006 06:56:08 +0000 (06:56 +0000)
committermkr <mkr@opencascade.com>
Thu, 11 May 2006 06:56:08 +0000 (06:56 +0000)
display ports type from corresponding XML catalog instead.

src/SUPERVGUI/SUPERVGUI_CanvasNodePrs.cxx

index 6f03a189458a5976921bb8d9cd096999c77a616f..481151299b5871a73eff8c6278ef8cbc1d7bf9a7 100644 (file)
@@ -887,8 +887,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;