Skip to content

Commit

Permalink
[processing] Fix items are not correctly placed in model designer
Browse files Browse the repository at this point in the history
when view is not set to top-left of model scene

(cherry picked from commit 8154008)
  • Loading branch information
nyalldawson committed Mar 5, 2019
1 parent ad3ba97 commit 089e418
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/modeler/ModelerDialog.py
Expand Up @@ -337,11 +337,11 @@ def input_dropped(id, pos):
data = event.mimeData().data('application/x-vnd.qgis.qgis.algorithmid')
stream = QDataStream(data, QIODevice.ReadOnly)
algorithm_id = stream.readQString()
QTimer.singleShot(0, lambda id=algorithm_id, pos=event.pos(): alg_dropped(id, pos))
QTimer.singleShot(0, lambda id=algorithm_id, pos=self.view.mapToScene(event.pos()): alg_dropped(id, pos))
event.accept()
elif event.mimeData().hasText():
itemId = event.mimeData().text()
QTimer.singleShot(0, lambda id=itemId, pos=event.pos(): input_dropped(id, pos))
QTimer.singleShot(0, lambda id=itemId, pos=self.view.mapToScene(event.pos()): input_dropped(id, pos))
event.accept()
else:
event.ignore()
Expand Down

0 comments on commit 089e418

Please sign in to comment.