forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user