From d34c52d7e869750a1e3c6256f32a5019b212c20f Mon Sep 17 00:00:00 2001 From: Treeki Date: Tue, 22 Nov 2011 23:06:49 +0100 Subject: this should *hopefully* fix the weird deletion bug --- src/editorui/editormain.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/editorui/editormain.py') diff --git a/src/editorui/editormain.py b/src/editorui/editormain.py index 8ffd034..f25452b 100644 --- a/src/editorui/editormain.py +++ b/src/editorui/editormain.py @@ -260,11 +260,14 @@ class KPEditorWidget(QtGui.QGraphicsView): endNode = origPath._endNodeRef() origPath.setEnd(node) - origPath.qtItem.updatePosition() nodeItem = KPEditorNode(node) self.scene().addItem(nodeItem) + # TODO: fix this ugly bit of code + item._endNodeRef = weakref.ref(nodeItem) + item.updatePosition() + self.painting = node self.paintingItem = item self.paintBeginPosition = (x - 12, y - 12) -- cgit v1.2.3