diff options
author | Treeki <treeki@gmail.com> | 2011-11-22 23:06:49 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-11-22 23:06:49 +0100 |
commit | d34c52d7e869750a1e3c6256f32a5019b212c20f (patch) | |
tree | 1e23296e6eeca61558bf7840878ebf51fd2218f9 /src/editorui/paths.py | |
parent | 3acb4765f5f80f0354213c1e23b9a2565bcdb58c (diff) | |
download | koopatlas-d34c52d7e869750a1e3c6256f32a5019b212c20f.tar.gz koopatlas-d34c52d7e869750a1e3c6256f32a5019b212c20f.zip |
this should *hopefully* fix the weird deletion bug
Diffstat (limited to 'src/editorui/paths.py')
-rw-r--r-- | src/editorui/paths.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/editorui/paths.py b/src/editorui/paths.py index c8cac78..cec85fa 100644 --- a/src/editorui/paths.py +++ b/src/editorui/paths.py @@ -389,6 +389,11 @@ class KPEditorPath(QtGui.QGraphicsLineItem): def updatePosition(self): path = self._pathRef() + sn = path._startNodeRef() + en = path._endNodeRef() + if sn is None or en is None: + return + x1, y1 = path._startNodeRef().position x2, y2 = path._endNodeRef().position @@ -421,6 +426,11 @@ class KPEditorPath(QtGui.QGraphicsLineItem): def remove(self, withItem=False): + if hasattr(self, 'hasBeenRemovedAlready'): + return + + self.hasBeenRemovedAlready = True + path = self._pathRef() layer = KP.map.pathLayer |