From a8bdabd1c8538f43a17a64ccc93d3df604d18bae Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 7 Jun 2010 11:41:10 +0200 Subject: Fix QTransform::map(const QPainterPath &) not working with paths that have only one element Replaced the isEmpty() check for the shortcut in map() with elementCount() == 0 Task-number: QTBUG-11264 Reviewed-by: Samuel (cherry picked from commit 90e009e9e273a4fea5166007e4c2b0638c6588cd) --- src/gui/painting/qtransform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp index ba2145480a..995bac8bc0 100644 --- a/src/gui/painting/qtransform.cpp +++ b/src/gui/painting/qtransform.cpp @@ -1565,7 +1565,7 @@ static QPainterPath mapProjective(const QTransform &transform, const QPainterPat QPainterPath QTransform::map(const QPainterPath &path) const { TransformationType t = inline_type(); - if (t == TxNone || path.isEmpty()) + if (t == TxNone || path.elementCount() == 0) return path; if (t >= TxProject) -- cgit v1.2.1