Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.5.2
-
None
Description
Steps to reproduce / test case:
In Bug in qt_painterpath_check_crossing()
case QPainterPath::MoveToElement: if (i > 0 && qFuzzyCompare(last_pt.x(), last_start.y()) && qFuzzyCompare(last_pt.y(), last_start.y()) && qt_painterpath_isect_line_rect(last_pt.x(), last_pt.y(), last_start.x(), last_start.y(), rect)) return true; last_start = last_pt = e; break;
should be
case QPainterPath::MoveToElement: if (i > 0 && ( !qFuzzyCompare(last_pt.x(), last_start.y()) || !qFuzzyCompare(last_pt.y(), last_start.y()) ) && qt_painterpath_isect_line_rect(last_pt.x(), last_pt.y(), last_start.x(), last_start.y(), rect)) return true; last_start = last_pt = e; break;
This bug results in refresh artefacts in QGraphicsScene painting. A typical case would be a QGraphicsRectItem moving so that it intersects another QGraphicsRectItem on its side that the above code catches i.e. the side formed by the last and first points on its path. In such a case you see the background drawn correctly in the refreshed area but the QGraphicsRectItem is not caught as being intersecting the region and so is not redrawn.