| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
We have to use the effectiveBoundingRect() when finding out which items
to repaint within a specific area. However, we don't want items to be
clickable on the shadow, so we shouldn't use effectiveBoundingRect for
normal item-lookup. Solution to this is to only use
effectiveBoundingRect() in the BSP (used by estimateTopLevels) and in
drawSubtreeRecursive.
Auto-test included.
|
|
|
|
|
|
| |
Some QT_{BEGIN,END}_HEADER macros had been missing or misplaced.
Reviewed-by: thiago
|
| |
|
|
|
|
|
|
|
| |
The problem was that we didn't regenerate the bsp when adding
items after calling QGraphicsScene::clear.
Reviewed-by: alexis
|
|
|
|
|
|
|
|
|
|
| |
Found during manual testing (manualtests/graphicsview/untransformable).
At some point it was not possible to click on an untransformable item.
The problem was that none of the untransformable items were top-levels,
and none of the transformable top-level items were in the same area,
resulting in an empty list of estimated top-level items.
Auto-test included.
|
|
|
|
|
|
|
|
|
|
| |
New method: QGraphicsSceneIndex::estimateTopLevelItems.
QGraphicsSceneIndex::estimateItems returns *all* items within the rect,
but we are only interested in the top-levels (those that are within the
rect themselves or have descendants within the rect) when doing
recursive drawing/item-lookup.
All auto-tests pass. Demos/examples/manualtests run fine.
|
|
|
|
|
|
|
|
|
| |
We don't have to do a stable sort anymore because the lessThan operator
now accounts for the insertion order. This also means we don't have to
sort all top-level items to preserve the insertion order in
QGraphicsScenePrivate::topLevelItemsInStackingOrder.
Reviewed-by: Andreas
|
|
|
|
|
|
|
|
|
|
| |
This revertes d39a62720ba67a0fa6e4e37519d22f14c7b7404e
(we had to do it with the old implementation, but the new one have
untransformable items included in the indexed list. The only difference
is that untransformable items are also in the untransformable list;
otherwise in the bsp tree).
Auto-test included.
|
|
|
|
|
|
|
|
| |
Ensure the index of indexed items are reset to -1.
Makes tst_QGraphicsScene::itemIndexMethod happy.
(this test passed before we actually started using the BSP from
the items() functions, see 6ee3fb750377eeedf161d96fef02c5fa336810e9)
|
|
|
|
|
|
| |
This caused a crash in the diagramscene example because "!bits & something"
does not have the same meaning as "!(bits & something)", hence item was
never removed from the BSP resulting in a stale item pointer.
|
|
|
|
|
| |
Ensure the BSP resets the QGraphicsItemPrivate::itemDiscovered bit
before returning the list of discovered items.
|
|
|
|
| |
Reviewed-by: Andreas
|
|
|
|
|
| |
This patch adds better support for untransformable items and removes
some redundant code.
|
|
|
|
|
|
| |
Avoid unwanted recursion by keeping the sceneRect variable locally. The
recursion happens if the call to sceneRect() lazily emits the
sceneRectChanged() signal.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Be sure that item goes in the correct list if it set its flags to
untransformable.
Reviewed-by: andreas
|
|
|
|
|
|
| |
We'll keep this as private API for now.
Reviewed-by: Alexis
|
|
|
|
|
|
| |
We'd like to keep this API private for now.
Reviewed-by: Alexis
|
|
|
|
|
|
|
| |
This change removes all code that handles ItemIgnoresTransformations
from QGraphicsView, and changes the APIs of the scene index intersectors.
Reviewed-by: Alexis
|
|
|
|
|
| |
A few minor modifications only, marked some things as ### obsolete,
removed the public get/set for the index (it's internal anyway).
|
|
|