QGraphicsView - fix rubberband to stay right on scroll
authorThorbjørn Lund Martsum <tmartsum@gmail.com>
Wed, 28 Nov 2012 13:47:34 +0000 (14:47 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 1 Dec 2012 07:28:43 +0000 (08:28 +0100)
commit51914375b615ddcac711171ac31779fea01b4323
tree9b90483be27836ad99798d62b14dbb8770ad381b
parent1b95d3331cb43fda36f92189ddce4e4c45bd47ea
QGraphicsView - fix rubberband to stay right on scroll

We should consider the scene-position when we are expanding
moving a rubberband. If the user does some auto-scroll
(Qt should support that itself, but that is another matter)
then the rubberband should not keep the (old) local position
to calculate the rubberband extension, but instead use the
scene-position that was actually clicked.

Change-Id: I04a2df6a1edae8b3587e1ac2104c7fe4ccfb7762
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/widgets/graphicsview/qgraphicsview.cpp
tests/manual/widgets/qgraphicsview/rubberband/rubberbandtest.cpp [new file with mode: 0644]
tests/manual/widgets/qgraphicsview/rubberband/rubberbandtest.pro [new file with mode: 0644]