summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitemanimation.h
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-08-12 07:33:37 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-08-12 08:55:48 (GMT)
commitd67b7829e7d5d8fbd57b701f4268dc1c6d77f1b0 (patch)
treed036ef35cf109fb171c6998aebb5ca6f515d66d8 /src/gui/graphicsview/qgraphicsitemanimation.h
parent1d3de98158b9409fa63e2e7cf8d3ca8b77f26285 (diff)
downloadQt-d67b7829e7d5d8fbd57b701f4268dc1c6d77f1b0.zip
Qt-d67b7829e7d5d8fbd57b701f4268dc1c6d77f1b0.tar.gz
Qt-d67b7829e7d5d8fbd57b701f4268dc1c6d77f1b0.tar.bz2
Fix a bug in removeAnchors and reorder how anchors are removed.
The problem was that if an item had a center anchor and we removed the left-center anchor before we called removeCenterAnchors(). Suppose the center vertex had 3 edges, (refcount was 3) removeAnchor would then *first* remove the left-center edge, causing the internalVertex refcount to go to 2. That would cause removeInternalVertex() to try to "merge" the two center anchors by calling removeCenterAnchors(). Of course, calling removeCenterAnchors at that point did not work since removeCenterAnchors() assumed that the only two edges connected to the center vertex was its internal left-center and center-right anchors. This was not the case, and the assertion Q_ASSERT(first && center && last); was triggered, since first (or last) was removed at that point. Of course it was not enough to simply call removeCenterAnchors first, because that function assumed that the only two anchors connected to the center vertex was "internal center anchors". removeAnchors is a bit special since we are not really interested in first converting the "internal center anchors" to a single internal anchor because the ultimate goal of that function is to remove *all* anchors. The solution was the additional argument "substitute" to indicate that we really just want to substitute with a simpler anchor (normal behaviour). If not, we really just want to delete the center anchors (don't even try to merge them into a simple internal anchor).
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitemanimation.h')
0 files changed, 0 insertions, 0 deletions