summaryrefslogtreecommitdiff
path: root/src/main/python/shapes/line.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/python/shapes/line.py')
-rw-r--r--src/main/python/shapes/line.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/python/shapes/line.py b/src/main/python/shapes/line.py
index 0af0585..268b750 100644
--- a/src/main/python/shapes/line.py
+++ b/src/main/python/shapes/line.py
@@ -805,6 +805,11 @@ class Line(QGraphicsPathItem):
else:
self.hideGripItem()
return
+ if change == QGraphicsItem.ItemSceneHasChanged and not self.scene():
+ for line in self.midLines:
+ if line.scene():
+ line.scene().removeItem(line)
+
return super(Line, self).itemChange(change, value)