mirror of https://gitlab.com/pamhyr/pamhyr2
Scenario: Graph: Fix mouse button event.
parent
4bf0ad40b1
commit
e5b4c998cb
|
|
@ -357,8 +357,10 @@ class GraphWidget(QGraphicsView):
|
||||||
if len(selectable_items) == 0:
|
if len(selectable_items) == 0:
|
||||||
if event.buttons() & Qt.LeftButton:
|
if event.buttons() & Qt.LeftButton:
|
||||||
old_p = self.mapToScene(
|
old_p = self.mapToScene(
|
||||||
float(self.m_origin_x),
|
QPoint(
|
||||||
float(self.m_origin_y)
|
int(self.m_origin_x),
|
||||||
|
int(self.m_origin_y)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
new_p = self.mapToScene(event.pos())
|
new_p = self.mapToScene(event.pos())
|
||||||
translation = new_p - old_p
|
translation = new_p - old_p
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue