def actionDuplicate(self, par, obj): if obj is not None: inx = par.index(obj) + 1 new = Jso.JIndex(inx, Jso.copyObject(obj.value)) par.append(new, inx) self.treeView.refresh() self.flow.add(copy.deepcopy(self.jsonData))
def actionAddValue(self, par, obj): if obj is not None: inx = par.index(obj) + 1 new = Jso.JIndex(inx, Jso.copyObject(obj.value)) else: inx = -1 new = Jso.JIndex(par.count(), self.createLine()) par.append(new, inx) self.treeView.refresh() self.flow.add(copy.deepcopy(self.jsonData))