]> AND Private Git Repository - blast.git/blobdiff - ConnectionItem.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
start modifying read/write blocks and project to take into account control ifaces
[blast.git] / ConnectionItem.cpp
index eaf46c22482f751fd926dae6b02dd068f0fc60ec..78a3651dea989cac1ff8f34033bf296f3f213899 100644 (file)
@@ -84,6 +84,13 @@ ConnectionItem::ConnectionItem(InterfaceItem* _iface1,
   setFlag(ItemSendsGeometryChanges);
   setCursor(Qt::PointingHandCursor);
   setZValue(0);
   setFlag(ItemSendsGeometryChanges);
   setCursor(Qt::PointingHandCursor);
   setZValue(0);
+  
+  if (fromInterfaceItem->refInter->getPurpose() == AbstractInterface::Data) {
+    visible = true;
+  }
+  else {
+    visible = false;
+  }
 
   setPath();
 }
 
   setPath();
 }
@@ -133,6 +140,8 @@ void ConnectionItem::paint(QPainter *painter,
                            const QStyleOptionGraphicsItem *option,
                            QWidget *widget) {
 
                            const QStyleOptionGraphicsItem *option,
                            QWidget *widget) {
 
+  if (!visible) return;
+  
   painter->setPen(Qt::blue);
   if(selected){
     painter->setPen(Qt::red);
   painter->setPen(Qt::blue);
   if(selected){
     painter->setPen(Qt::red);