summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/python/main.py2
-rw-r--r--src/main/python/utils/graphics.py2
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):