]> SALOME platform Git repositories - modules/superv.git/blobdiff - src/SUPERVGUI/SUPERVGUI_GraphNode.cxx
Salome HOME
NRI : Merge from V1_2.
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_GraphNode.cxx
index 283cf0f0de3b098dbb092d88223f977af022767a..c3c6c6c27266ccf5834b236ca1173d0dd256aeee 100644 (file)
@@ -288,6 +288,24 @@ void SUPERVGUI_GraphNode::updateLinksPrs(bool toCheckExisting) {
   }
   delete ihmList;
 
+  //Find PortInESNode
+  SUPERVGUI_PortInESNode* piES;
+  QObjectList* ihmListES = queryList("SUPERVGUI_PortInESNode");
+  QObjectListIt iES(*ihmListES);
+  while ((piES=(SUPERVGUI_PortInESNode*)iES.current()) != 0) {
+    ++iES;
+    if (piES->getPort()->IsLinked()) {
+      SUPERV_Links aLinks = piES->getPort()->Links();
+      for (int j=0; j<aLinks->length(); j++) {
+       if (toCheckExisting) {
+         if (aGraph->isLinkPrsExists(aLinks[j]))
+           continue;
+       }
+       aGraph->createLinkPrs(aLinks[j]);
+      }
+    }
+  }
+  delete ihmListES;
 }
 
 
@@ -402,3 +420,16 @@ void SUPERVGUI_GraphNode::updatePorts() {
     }
   }
 }
+
+
+/**
+ * Returns coordinates of connection point in content coordinates
+ */
+QPoint SUPERVGUI_GraphNode::getInConnectPnt() {
+  return QPoint(pos().x(), 
+               pos().y() + (height()/2));
+}
+QPoint SUPERVGUI_GraphNode::getOutConnectPnt() {
+  return QPoint(pos().x() + width(),
+               pos().y() + (height()/2));
+}