mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Scenario: Graph: Fix mouse button event.
This commit is contained in:
1 parent
4bf0ad40b1
commit
e5b4c998cb
1 file changed
+4
-2
@@ -357,8 +357,10 @@ class GraphWidget(QGraphicsView):
|
||||
if len(selectable_items) == 0:
|
||||
if event.buttons() & Qt.LeftButton:
|
||||
old_p = self.mapToScene(
|
||||
float(self.m_origin_x),
|
||||
float(self.m_origin_y)
|
||||
QPoint(
|
||||
int(self.m_origin_x),
|
||||
int(self.m_origin_y)
|
||||
)
|
||||
)
|
||||
new_p = self.mapToScene(event.pos())
|
||||
translation = new_p - old_p
|
||||
|
||||
Reference in new issue
Block a user