diff options
author | Blaine | 2020-06-19 11:42:46 +0530 |
---|---|---|
committer | Blaine | 2020-06-19 11:42:46 +0530 |
commit | adbe155abe6604b07c8ef076311f3e9e7a8268b0 (patch) | |
tree | c5dc83f4505944f3da6582de8c194b8408066f13 | |
parent | 6a306ce01a9501f5580e81e9263cd34987ba7bc4 (diff) | |
download | Chemical-PFD-adbe155abe6604b07c8ef076311f3e9e7a8268b0.tar.gz Chemical-PFD-adbe155abe6604b07c8ef076311f3e9e7a8268b0.tar.bz2 Chemical-PFD-adbe155abe6604b07c8ef076311f3e9e7a8268b0.zip |
undo add
-rw-r--r-- | src/main/python/main.py | 2 | ||||
-rw-r--r-- | src/main/python/utils/graphics.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/python/main.py b/src/main/python/main.py index 4cf1791..43dcbf3 100644 --- a/src/main/python/main.py +++ b/src/main/python/main.py @@ -77,8 +77,8 @@ class appWindow(QMainWindow): graphic = getattr(shapes, object['object'])(*map(lambda x: int(x) if x.isdigit() else x, object['args'])) # graphic.setPen(QPen(Qt.black, 2)) # graphic.setFlags(QGraphicsItem.ItemIsSelectable | QGraphicsItem.ItemIsMovable) - currentDiagram.addItemPlus(graphic) graphic.setPos(20, 20) + currentDiagram.addItemPlus(graphic) def newProject(self): #call to create a new file inside mdi area diff --git a/src/main/python/utils/graphics.py b/src/main/python/utils/graphics.py index 3e1d193..0dca012 100644 --- a/src/main/python/utils/graphics.py +++ b/src/main/python/utils/graphics.py @@ -49,8 +49,8 @@ class customView(QGraphicsView): graphic = getattr(shapes, obj[0])(*map(lambda x: int(x) if x.isdigit() else x, obj[1:])) # graphic.setPen(QPen(Qt.black, 2)) # graphic.setFlags(QGraphicsItem.ItemIsSelectable | QGraphicsItem.ItemIsMovable) - self.scene().addItemPlus(graphic) graphic.setPos(QDropEvent.pos().x(), QDropEvent.pos().y()) + self.scene().addItemPlus(graphic) QDropEvent.acceptProposedAction() def wheelEvent(self, QWheelEvent): |