From 5e9fdd9682bb41b952eb39b5869cc4dc5fc59ecb Mon Sep 17 00:00:00 2001 From: brenda-br Date: Mon, 6 Feb 2023 20:56:13 +0530 Subject: Undeletable Line Grips --- src/main/python/utils/undo.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main/python/utils/undo.py') diff --git a/src/main/python/utils/undo.py b/src/main/python/utils/undo.py index 2f28964..8e21fe7 100644 --- a/src/main/python/utils/undo.py +++ b/src/main/python/utils/undo.py @@ -83,8 +83,15 @@ class deleteCommand(QUndoCommand): return startIndex,endIndex def reconnectLines(self): - self.startGrip.lineGripItems[self.indexLGS].lines.append(self.diagramItem) - self.endGrip.lineGripItems[self.indexLGE].lines.append(self.diagramItem) + try: + self.startGrip.lineGripItems[self.indexLGS].lines.append(self.diagramItem) + except: + pass + try: + self.endGrip.lineGripItems[self.indexLGE].lines.append(self.diagramItem) + except: + pass + class moveCommand(QUndoCommand): """ QUndoCommand for move item event -- cgit