diff options
author | brenda-br | 2023-02-21 14:07:35 +0530 |
---|---|---|
committer | brenda-br | 2023-02-21 14:07:35 +0530 |
commit | a6814bfd4c6a9eb228a8939d1dee0dd0b5d16786 (patch) | |
tree | 05ee4988b847ee68ff13dcf27afbe2ce26d4b3c6 /src/main/python/utils/graphics.py | |
parent | 2fd33c0f594531aa473664f5ddf71d3af1c9f427 (diff) | |
download | Chemical-PFD-a6814bfd4c6a9eb228a8939d1dee0dd0b5d16786.tar.gz Chemical-PFD-a6814bfd4c6a9eb228a8939d1dee0dd0b5d16786.tar.bz2 Chemical-PFD-a6814bfd4c6a9eb228a8939d1dee0dd0b5d16786.zip |
Fix #33 Restrict Movable area of Node Items
Diffstat (limited to 'src/main/python/utils/graphics.py')
-rw-r--r-- | src/main/python/utils/graphics.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/python/utils/graphics.py b/src/main/python/utils/graphics.py index c4e1843..1b797d5 100644 --- a/src/main/python/utils/graphics.py +++ b/src/main/python/utils/graphics.py @@ -44,6 +44,7 @@ class CustomView(QGraphicsView): graphic = getattr(shapes, obj[0])(*map(lambda x: int(x) if x.isdigit() else x, obj[1:])) graphic.setPos(QDropEvent.pos().x(), QDropEvent.pos().y()) self.scene().addItemPlus(graphic) + graphic.setParent(self) QDropEvent.acceptProposedAction() def wheelEvent(self, QWheelEvent): |