diff options
author | Andreas Klots <andreasklots@gmail.com> | 2020-10-05 16:19:11 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-06 08:26:57 +0000 |
commit | 40874625f996899ca1e976f0240da697e784c2c6 (patch) | |
tree | f2a3f77dfc3eeed49559737ba7a66a9f71f98bba /examples/widgets | |
parent | 62fed23fefef0738ef55a17f96efd49e30313152 (diff) |
Fix a bug in the initialization (and debug-output) of BSP trees
On a horizontal split the current rectangle is split along the y-axis,
creating two children with the dimensions [x, y, width, height / 2]
and [x, y + height / 2, width, height / 2] respectively. When the
BSP tree is initialized, the type of the root node is set to
"Horizontal". However, the offset of the root node is wrongly
initialized with a split along the x-axis instead of the y-axis.
This leads to wrong behavior on QGraphicsScenes with a non square
aspect ratio. E.g on a QGraphicsScene with an apsect ratio favoring
the y-axis, every item between yItem = sceneWidth/2 and
yItem = sceneHeight/2 will be added to the wrong leaf.
[ChangeLog][QWidgets][QGraphicsScene] Fixed a bug in the initialization
of BSP trees to increase the performance of QGraphicsScenes with non
quadratic scene rectangles.
Fixes: QTBUG-87174
Pick-to: 5.15
Change-Id: I360033e94e22eb961f820278993754d10bfc1e45
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples/widgets')
0 files changed, 0 insertions, 0 deletions