diff options
| author | Taras Kachmaryk <gigaxenum335@gmail.com> | 2022-11-25 15:58:43 +0200 |
|---|---|---|
| committer | Taras Kachmaryk <gigaxenum335@gmail.com> | 2022-11-26 16:07:15 +0200 |
| commit | f0cd18706f6ffca09a7bfbc84542a9e79b4a55f3 (patch) | |
| tree | fdd6b48d642072e2aecd5432911fb85f1710f396 /examples/opengl/qopenglwidget/bubble.cpp | |
| parent | 3ee7a9f85c9d4566223f44f7bab04abafdfca82c (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/bubble.cpp')
0 files changed, 0 insertions, 0 deletions
