[ui] UIGraph: rename 'addNode' to 'addNewNode' to match core.graph API

This commit is contained in:
Yann Lanthony 2018-03-15 12:20:44 +01:00
parent 450f800fef
commit 2e4d9b85e6
2 changed files with 3 additions and 3 deletions

View file

@ -246,7 +246,7 @@ class UIGraph(QObject):
self._undoStack.endMacro()
@Slot(str, result=QObject)
def addNode(self, nodeType, **kwargs):
def addNewNode(self, nodeType, **kwargs):
""" [Undoable]
Create a new Node of type 'nodeType' and returns it.
@ -307,7 +307,7 @@ class UIGraph(QObject):
if not createEdges:
serialized["attributes"] = {k: v for k, v in serialized["attributes"].items() if not graph.isLink(v)}
# create a new node of the same type and with the same attributes values
node = self.addNode(serialized["nodeType"], **serialized["attributes"])
node = self.addNewNode(serialized["nodeType"], **serialized["attributes"])
return node
@Slot(graph.Node, result="QVariantList")

View file

@ -86,7 +86,7 @@ Item {
function createNode(nodeType)
{
// add node via the proper command in uigraph
uigraph.addNode(nodeType)
uigraph.addNewNode(nodeType)
// retrieve node delegate (the last one created in the node repeater)
var item = nodeRepeater.itemAt(nodeRepeater.count-1)
// convert mouse position