Skip to content

Commit

Permalink
Add a little debug output to make clear the source of the QPaintEngine
Browse files Browse the repository at this point in the history
error


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5068 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Mar 20, 2006
1 parent be8446b commit a050eeb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gui/qgsmaprender.cpp
Expand Up @@ -205,6 +205,15 @@ void QgsMapRender::render(QPainter* painter)
std::cout << "QgsMapRender::render: at layer item '" << (*li).toLocal8Bit().data() << "'." << std::endl;
#endif

// This call is supposed to cause the progress bar to
// advance. However, it seems that updating the progress bar is
// incompatible with having a QPainter active (the one that is
// passed into this function), as Qt produces a number of errors
// when try to do so. I'm (Gavin) not sure how to fix this, but
// added these comments and debug statement to help others...
std::cerr << "If there is a QPaintEngine here, it is caused by an emit "
"call just after line " << __LINE__ << " in file " << __FILE__ << ".\n";

emit setProgress(myRenderCounter++,layers.size());
QgsMapLayer *ml = QgsMapLayerRegistry::instance()->mapLayer(*li);

Expand Down

0 comments on commit a050eeb

Please sign in to comment.