QmlProfiler: Don't try to paint things in pixmap of negative size.

In certain conditions the area covered by the canvas can have a negative
size. This patch handles that case gracefully.

Change-Id: I952edfa5bd0f8b42ce69356106f2e0f326dceeb7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2013-11-18 13:25:16 +01:00
parent b0ca7d129f
commit 69041fbb5c

View File

@@ -69,7 +69,7 @@ void QmlProfilerCanvas::draw()
m_context2d->reset();
m_context2d->setSize(width(), height());
if (width() != 0 && height() != 0)
if (width() > 0 && height() > 0)
emit drawRegion(m_context2d, QRect(0, 0, width(), height()));
update();
}