diff options
author | brenda-br | 2023-03-02 17:47:08 +0530 |
---|---|---|
committer | brenda-br | 2023-03-02 17:47:08 +0530 |
commit | c9cf87cd94d97c2166e3acdaec8f638c11d4a779 (patch) | |
tree | 02ba055d359ea6c2e46793a193892df0ad560639 /Graphics.py | |
parent | 7af3526e105cc330422f8742ec5edec1c4a0a98f (diff) | |
download | Chemical-Simulator-GUI-c9cf87cd94d97c2166e3acdaec8f638c11d4a779.tar.gz Chemical-Simulator-GUI-c9cf87cd94d97c2166e3acdaec8f638c11d4a779.tar.bz2 Chemical-Simulator-GUI-c9cf87cd94d97c2166e3acdaec8f638c11d4a779.zip |
Commenting Undo and Redo Functions
Diffstat (limited to 'Graphics.py')
-rw-r--r-- | Graphics.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Graphics.py b/Graphics.py index 16a4189..4779a12 100644 --- a/Graphics.py +++ b/Graphics.py @@ -396,19 +396,19 @@ class NodeSocket(QtWidgets.QGraphicsItem): del self.new_line super(NodeSocket, self).mouseReleaseEvent(event) - try: - data = get_last_list('Undo') - comp_selected = data[-1] - data.remove(comp_selected) - for i in range(len(data)): - if data[i].name == self.new_line.source.parent.obj.name: - data[i] = self.new_line.source.parent.obj - elif data[i].name == self.new_line.target.parent.obj.name: - data[i] = self.new_line.target.parent.obj - data.append(comp_selected) - push('Undo', data) - except Exception as e: - print(e) + # try: + # data = get_last_list('Undo') + # comp_selected = data[-1] + # data.remove(comp_selected) + # for i in range(len(data)): + # if data[i].name == self.new_line.source.parent.obj.name: + # data[i] = self.new_line.source.parent.obj + # elif data[i].name == self.new_line.target.parent.obj.name: + # data[i] = self.new_line.target.parent.obj + # data.append(comp_selected) + # push('Undo', data) + # except Exception as e: + # print(e) def get_center(self): rect = self.boundingRect() |