[core] change param order in Edge constructor

This commit is contained in:
Fabien Castan 2017-10-16 10:57:19 +02:00
parent 287c0f13ce
commit d74affba35

View file

@ -152,10 +152,10 @@ class Attribute(BaseObject):
class Edge(BaseObject):
def __init__(self, dst, src, parent=None):
def __init__(self, src, dst, parent=None):
super(Edge, self).__init__(parent)
self._dst = dst
self._src = src
self._dst = dst
@property
def src(self):
@ -615,7 +615,7 @@ class Graph(BaseObject):
raise RuntimeError('The attributes of the edge should be part of a common graph.')
if inputAttr in self.edges.keys():
raise RuntimeError('Input attribute "{}" is already connected.'.format(inputAttr.fullName()))
self.edges.add(Edge(inputAttr, outputAttr))
self.edges.add(Edge(outputAttr, inputAttr))
inputAttr.valueChanged.emit()
def addEdges(self, *edges):