Commit 69041fbb authored by Ulf Hermann's avatar Ulf Hermann

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: default avatarKai Koehne <kai.koehne@digia.com>
parent b0ca7d12
...@@ -69,7 +69,7 @@ void QmlProfilerCanvas::draw() ...@@ -69,7 +69,7 @@ void QmlProfilerCanvas::draw()
m_context2d->reset(); m_context2d->reset();
m_context2d->setSize(width(), height()); m_context2d->setSize(width(), height());
if (width() != 0 && height() != 0) if (width() > 0 && height() > 0)
emit drawRegion(m_context2d, QRect(0, 0, width(), height())); emit drawRegion(m_context2d, QRect(0, 0, width(), height()));
update(); update();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment