summaryrefslogtreecommitdiffstats
path: root/examples/opengl/qopenglwidget
diff options
context:
space:
mode:
authorTaras Kachmaryk <gigaxenum335@gmail.com>2022-11-25 15:58:43 +0200
committerTaras Kachmaryk <gigaxenum335@gmail.com>2022-11-26 16:07:15 +0200
commitf0cd18706f6ffca09a7bfbc84542a9e79b4a55f3 (patch)
treefdd6b48d642072e2aecd5432911fb85f1710f396 /examples/opengl/qopenglwidget
parent3ee7a9f85c9d4566223f44f7bab04abafdfca82c (diff)
QGraphicsView: fix jumping graphic items when dragging out of view
The algorithms for calculating the scene's position within the view did not compensate for scrollbars showing. The scrollbars should be ignored when positioning hte scene within the view, as alignment only cares about the positioning of the scene when the view is larger than the scene anyway. Add a test case that verifies that items don't jump up or down when dragging horizontally, and not left or right when dragging vertically. Mark variables in the modified function as const where applicable to make it easier to follow the code. Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Fixes: QTBUG-46757 Change-Id: If205637dfe124e0034f68201b23f174d6863084d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/opengl/qopenglwidget')
0 files changed, 0 insertions, 0 deletions