summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprofiler/canvas
diff options
context:
space:
mode:
authorChristiaan Janssen <christiaan.janssen@nokia.com>2011-07-08 11:43:19 +0200
committerChristiaan Janssen <christiaan.janssen@nokia.com>2011-07-08 12:10:56 +0200
commitc47b2aeda4218e737e4db37532c8c15ba1e4606f (patch)
tree2e5cd6615e36362003911fa5100c43c09bdb20b5 /src/plugins/qmlprofiler/canvas
parent83837baeb427ba46bf0462b782f9b80c0d7bb4b5 (diff)
downloadqt-creator-c47b2aeda4218e737e4db37532c8c15ba1e4606f.tar.gz
QmlProfiler: fix Context2D error when resizing
Change-Id: I9de22ea823b35bfd1893cf1388dfd82d332e275d Reviewed-on: http://codereview.qt.nokia.com/1358 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Diffstat (limited to 'src/plugins/qmlprofiler/canvas')
-rw-r--r--src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp b/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
index ddaa3d4d95..d9ac4a2ce9 100644
--- a/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
+++ b/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
@@ -941,6 +941,8 @@ void Context2D::beginPainting()
return;
if (m_pixmap.width() != m_width || m_pixmap.height() != m_height) {
+ if (m_painter.isActive())
+ m_painter.end();
m_pixmap = QPixmap(m_width, m_height);
m_pixmap.fill(parent()->property("color").value<QColor>());
}