Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_CanvasLink.cxx
index a58cbb5458bbad5f78a65a9917650c3045305c0d..3c957e645eca7c9ef4ed595fd7cfd22230cb0ca1 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
@@ -73,8 +90,8 @@ void SUPERVGUI_CanvasLink::createPrs()
       addPoint(myInputPort->getConnectionPoint());
     }
     if (!myMain->getCanvas()->isControlView()) {
-      long x, y;
-      for (int i = 0; i < myLink->CoordsSize(); i++) {
+      CORBA::Long x, y;
+      for (CORBA::Long i = 0; i < myLink->CoordsSize(); i++) {
        myLink->Coords(i+1, x, y);
        addPoint(QPoint(x, y), i+1);
       }
@@ -384,7 +401,8 @@ bool SUPERVGUI_CanvasLinkBuilder::canCreateEngine(SUPERVGUI_CanvasPort* thePort)
 
     // asv : 15.12.04 : NOT allow to connect Gate-to-InLine --> it does not make sence!
     // Out Gate port can be connected only to In Gate port 
-    if ( aOutKind == SUPERV::GateParameter && aInKind != SUPERV::GateParameter )
+    // mkr : NPAL14823 : Out Gate port can be connected to Inline port too
+    if ( aOutKind == SUPERV::GateParameter && aInKind != SUPERV::GateParameter && aInKind != SUPERV::InLineParameter )
       return false;
 
     // In Gate can be connected to (receive links from) Gate port and InLine ports (important for Switch nodes)