| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a regression when computing the clip path for a
QGraphicsWidget that clip its children to its shape. The clip path cache
use the bounding rect which has a null width and height the very first
time on a QGraphicsWidget. This might happen as well for any item that
have a null width and height (e.g. QGraphicsRectItem before you set the
rect). We should do better in mainline by refactoring this clip path
cache and calling it in prepareGeometryChange which should be called
when you update the shape and the boundingRect of the item. Do we
really need also in 4.6/mainline the clip path as it is now? This should
be investigate also. The auto-test cover the problem so we can use it
after for refactoring the cached clip path.
Task-number: 257232
Reviewed-by: andreas
Reviewed-by: bnilsen
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
| |
Reviewed-by:TrustMe
|
|
|
|
|
|
|
|
|
| |
updateAncestorFlags was not reseting the flags if you change the parent
that have for instance itemsClipChildrenToShape to a new one that
doesn't have that flag.
Task-number:258956
Reviewed-by:bnilsen
|
|
|
|
|
|
|
|
|
| |
This is confirmed to resolve a number of problems from the original
reportee. It's already fixed in Qt 4.6 in a more wider fix, but this
one liner is a good to have in Qt 4.5.x anyway.
Task-number: 258194
Reviewed-by: alexis
|
|
|
|
|
|
|
|
|
|
| |
If you start a hand scrolling and during moving, you press another button
of the mouse than the left one, the scrolling suddently stop working.
In mouseReleaseEvent we just stop the hand scrolling if the button is
left.
Task:258356
Reviewed-by:janarve
|
|
|
|
|
|
|
| |
focusWidget().
Reviewed-by: Thierry
Task-number: 255468
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
| |
Forwarding the ignoreOpacity flag to children in QGraphicsItemPrivate::fullUpdateHelper.
This is a complementary fix to task 252913, partly fixed in commit 2e3a5ea44...
Reviewed-by: bnilsen
BT: yes
|
|
|
|
|
|
|
|
|
| |
We were adding two times in the QActionPrivate list the entry for
the current QGraphicsWidget if the action was existing before.
Task-number:KDE
Reviewed-by:bnilsen
BT:yes
|
|
|
|
| |
Removed unused line and added task number to autotest.
|
|
|
|
|
|
|
|
|
| |
When setVisible() is called on a QGraphicsItem, if the parent of that
item was hidden, the child shouldn't be actually shown.
Task-number: 197802
Reviewed-by: leo
Reviewed-by: alexis
|
|
|
|
|
|
| |
Usually, "the the" is not proper English
Reviewed-By: Thiago Macieira
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QGraphicsItem::deviceTransform() returns the item-to-device transform,
provided with the device-to-scene transform, and combining it with the
item's scene transform. This function is meant to handle items that
enable ItemIgnoresTransformations, but it happened to not work properly
for items that _don't_ enable that flag. Unfortunately this bug is
hard to work around for users from the outside, as it requires you to
check if the item or any ancestor enables ItemIgnoresTransformations.
The fix also removes unnecessary branchs inside QGV so that we use the
same function for all items.
Reviewed-by: bnilsen
|
|
|
|
|
|
|
|
|
|
| |
In QGraphicsScene::_q_emitUpdated() the slot
QGrpahicsView::updateScene(QList<QRectF>) gets connected and a boolean
(connectedToScene) is set to prevent double connections. The problem is
that this boolean was not reset when the view gets a new scene.
Task-number: 253415
Reviewed-by: andreas
|
|
|
|
| |
Reviewed-by: nrc
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The problem was that we discarded update requests for fully
transparent items, which is correct, but we even did that
when the update was issued from QGraphicsItem::setOpacity.
We don't have to, and shouldn't, consider the opacity in
that case. Whenever we reach the fullUpdateHelper call in
setOpacity it means we have to do an update regardless of
the current opacity (oldOpacity was not 0.0 if the
currentOpacity is 0.0).
Auto-test included.
Task-number: 252913
Reviewed-by: Andreas
|
|/
|
|
| |
Task-number: 252287
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into it."
This reverts commit 0985805ab3c7de5b15c115a98afb15944b6d93b9.
The Elastic Nodes example shows a black background for the cache pixmap
if the call to fill isn't there. Alexis and I both agree that it makes
no sense that we fill the pixmap with transparent pixels instead of
just drawing with QPainter::CompositionMode_Source, but since this
regression was introduced after 4.5.0 was released we must revert before
we investigate further.
Reviewed-by: Alexis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a bug in 4.5.0 where cached items that call update() after
they have been moved or transformed failed to get a call to paint(),
so the last cache image was used to draw. The easiest way to reproduce
this bug is in the Elastic Nodes example. If you press, wait, then
release, the nodes will consistently move to sunken state, then back
to normal state. But if you click quickly while moving the mouse, the
nodes will stay sunken.
The bug was that the item was marked as dirty as a result of being moved,
and when the mouse button was released, the node item's call to update()
was discarded, as the item was "already dirty".
The fix is to allow invalidation of the cache even if the item is
marked as dirty.
Reviewed-by: bnilsen
|
|
|
|
|
|
|
|
|
| |
Previously we were calling two times itemChange on the parent to give
QGraphicsItem::ItemChildAddedChange. We don't need that. One is enough.
BT : yes
Task-number: BT
Reviewed-by: Andreas
|
|
|
|
|
|
|
|
|
|
|
|
| |
same.
updateBoudingRect update the item only if the boundingRect change
but if we have 123 as an initial text and then we set 321 as the new
text, then nothing happen because the rect is the same.
In case the boundingRect change then we call update 2 times but
the item is already dirty so the second call will just return.
BT:yes
Reviewed-by: Andreas
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Regression caused by optimizations in QGraphicsItem and QGraphicsScene.
The changes in QGraphicsItem fix bugs in QGraphicsItem::mapToParent
functions, which did the translation before applying the transformation,
instead of the other way (transform, then translate). This bug caused
almost all mapToParent and mapRectToParent functions to behave wrongly.
Unfortunately the new helper functions in QGraphicsScene for discovering
items made use of these functions, which introduced a regression. Fixing
these functions also fixes item discovery.
The other part of this change fixes a regression caused by c1909321,
which luckily happened after 4.5.0 and never saw the light of day. The
fix is to also invalidate the cached clip path even if there is no scene,
which is necessary if you build your scene graph outside the scene, and
finish off by adding the root item to the scene.
Task-number: 250680
Reviewed-by: Alexis
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem here is that we are filling the sceneEventFilters map
when we install evenfilter but we never remove the references of an
item if it has been removed from the scene or deleted. The deletion can
keep stale pointers into the map and a crash can happen.
BT:yes
Task-number:250272
Reviewed-by: bnilsen
Reviewed-by: andreas
|
|
|
|
|
|
|
|
|
|
|
| |
[regression]
The problem was that we didn't update the new region when we paint the
rubber band and we scroll at the same time
BT:yes
Task-number: 245766
Reviewed-by: bnilsen
Reviewed-by: andreas
|
|
|
|
|
|
| |
RevBy: mauricek
Details: using prefix qt_ instead of ::global namespace
|
|
|
|
| |
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change shows a limitation in Graphics View caused by QPen's
default width being 0 (cosmetic), while Graphics View actually
does not support cosmetic pens at all. Because items are at risk of
drawing lines that poke 1 pixel outside their bounding rect,
QGraphicsView must look for items that are up to one pixel
larger than their bounding rect mapped to viewport coordinates.
Furthermore, mapToScene(QRect) forces us to adjust the
input rectangle by (0, 0, 1, 1), because it uses QRect::bottomRight()
(etc) when mapping the rectangle to a polygon (which is _wrong_). Since
this behavior has been there since 4.2, we don't want to fix it in
a 4.5 patch release...
The only _proper_ fix to this problem is for the view to know the item's
"adjust" in device coordinates, allowing items to use cosmetic pens
freely. Fex, we could introduce QGraphicsItem::viewportMargins() or so.
Added an autotest to ensure this doesn't break again.
Reviewed-by: bnilsen
|
|
|
|
|
|
|
|
|
|
| |
0aa2ef27249dc8e782c2942340776bb19de80a0d
RevBy: TrustMe
AutoTest: tst_QGraphicsItem::boundingRegion() pass again
Details: The original code adjusted the QRect version of a mapped bounding rect,
wheras my patch adjusted a mapped bounding rect (QRectF) and then
converted it to a QRect.
|
|
|
|
|
|
|
|
| |
RevBy: Andreas
AutoTest: Still pass
Details: QRectF::intersects does not work with flat rectangles, so
we cannot intersect the bounding rect without adjusting it
first.
|
|
|
|
|
| |
RevBy: Olivier
AutoTest: Still pass
|
|
|
|
|
|
|
|
|
|
| |
RevBy: Andreas
AutoTest: tst_QGraphicsView::itemAt2 pass again
Details: A QPoint in the view has to be mapped to a pixel in the
scene, otherwise it won't be possible to e.g. click
on items that are smaller than a pixel.
So...we have to optimize the hit-testing code in another way
|
|
|
|
|
| |
RevBy: Andreas
AutoTest: included
|
|
|
|
|
| |
Implement specialized (and more efficient versions) of item_helper()
and child_helper() that test for QPointF in the scene.
|
|
|
|
|
| |
AutoTest: Still pass.
Details: It's easier to read and understand the code now.
|
|
|
|
|
|
|
|
| |
AutoTest: Still pass.
Details: Update requests can be discarded if the item itself is
clipped away and the item clips all its children to shape.
This cut-off is extremely effective (and aggressive:))
|
|
|
|
| |
AutoTest: Still pass
|
|
|
|
| |
AutoTest: Still pass
|
|
|
|
| |
Details: It's clipped away regardless.
|
|
|
|
| |
RevBy: TrustMe
|
|
|
|
|
|
|
| |
AutoTest: Still pass
Details: Get rid of QTransform::inverted()/operator*= and do
nothing if the item clips all its children and the update
rect is outside the bounding rect.
|
|
|
|
|
|
|
|
| |
AutoTest: Still pass.
Details: Update requests can be discarded if the item itself is
clipped away and the item clips all its children to shape.
This cut-off is extremely effective (and aggressive:))
|
|
|
|
| |
RevBy: Andreas
|
|
|
|
| |
RevBy: TrustMe
|
|
|
|
|
|
|
|
| |
RevBy: Andreas
AutoTest: still pass
Details: Adds emptyClipPath bit, a cut-off to test if the item
has an empty clip path (i.e., is clipped away). Also adds
code for invalidating the cache from inside setPos().
|
| |
|
|
|
|
|
|
|
| |
RevBy: Olivier
AutoTest: Still pass.
Details: Items usually don't have effective opacity, i.e. it is 1.0, so
don't bother doing fuzzy compare if that's the case.
|
|
|
|
|
| |
RevBy: TrustMe
Details: ...otherwise it'll be empty and too much will be clipped away.
|