Skip to content

Commit a050eeb

Browse files
author
g_j_m
committed
Add a little debug output to make clear the source of the QPaintEngine
error git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5068 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent be8446b commit a050eeb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/gui/qgsmaprender.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,15 @@ void QgsMapRender::render(QPainter* painter)
205205
std::cout << "QgsMapRender::render: at layer item '" << (*li).toLocal8Bit().data() << "'." << std::endl;
206206
#endif
207207

208+
// This call is supposed to cause the progress bar to
209+
// advance. However, it seems that updating the progress bar is
210+
// incompatible with having a QPainter active (the one that is
211+
// passed into this function), as Qt produces a number of errors
212+
// when try to do so. I'm (Gavin) not sure how to fix this, but
213+
// added these comments and debug statement to help others...
214+
std::cerr << "If there is a QPaintEngine here, it is caused by an emit "
215+
"call just after line " << __LINE__ << " in file " << __FILE__ << ".\n";
216+
208217
emit setProgress(myRenderCounter++,layers.size());
209218
QgsMapLayer *ml = QgsMapLayerRegistry::instance()->mapLayer(*li);
210219

0 commit comments

Comments
 (0)