def isConnected(self, fromName, toName):
        """ Are these two layers connected this way? """
        for c in self.connections:
            if (c.fromLayer.name == fromName and
                c.toLayer.name == toName):
                return 1
        return 0