Skip to content
Permalink
Browse files
Small cleanups in debug messages, now displaying correct total render…
…ing time.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5766 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Sep 6, 2006
1 parent aee0750 commit 883c073a2e6ba469c1923f043277b91d523f20b2
Showing with 8 additions and 10 deletions.
  1. +8 −10 src/gui/qgsmaprender.cpp
@@ -195,10 +195,9 @@ void QgsMapRender::render(QPainter* painter)

mDrawing = true;

int myRenderCounter = 0;

#ifdef QGISDEBUG
QgsDebugMsg("QgsMapRender::render: Starting to render layer stack.");
QgsDebugMsg("Starting to render layer stack.");
QTime renderTime;
renderTime.start();
#endif
@@ -208,7 +207,7 @@ void QgsMapRender::render(QPainter* painter)

while (li != layers.end())
{
QgsDebugMsg("QgsMapRender::render: at layer item '" + (*li));
QgsDebugMsg("At layer item '" + (*li) + "'");

// This call is supposed to cause the progress bar to
// advance. However, it seems that updating the progress bar is
@@ -223,13 +222,13 @@ void QgsMapRender::render(QPainter* painter)

if (!ml)
{
QgsLogger::warning("QgsMapRender::render: layer not found in registry!");
QgsLogger::warning("Layer not found in registry!");
li++;
continue;
}

#ifdef QGISDEBUG
QgsDebugMsg("QgsMapRender::render: Rendering layer " + ml->name());
QgsDebugMsg("Rendering layer " + ml->name());
QgsLogger::debug(" Layer minscale ", ml->minScale(), 1, __FILE__, __FUNCTION__, __LINE__);
QgsLogger::debug(" Layer maxscale ", ml->maxScale(), 1, __FILE__, __FUNCTION__, __LINE__);
QgsLogger::debug(" Scale dep. visibility enabled? ", ml->scaleBasedVisibility(), 1,\
@@ -272,8 +271,8 @@ void QgsMapRender::render(QPainter* painter)
}
else
{
QgsDebugMsg("QgsMapRender::render: Layer not rendered because it is not within the defined \
visibility scale range")
QgsDebugMsg("Layer not rendered because it is not within the defined \
visibility scale range");
}

} // if (ml->visible())
@@ -282,7 +281,7 @@ visibility scale range")

} // while (li != end)

QgsDebugMsg("QgsMapRender::render: Done rendering map layers");
QgsDebugMsg("Done rendering map layers");

if (!mOverview)
{
@@ -316,8 +315,7 @@ visibility scale range")
emit setProgress(1,1);

#ifdef QGISDEBUG
QgsLogger::debug("QgsMapRender::render: Rendering done in (seconds)", renderTime.elapsed() / 1000.0, 1,\
__FILE__, __FUNCTION__, __LINE__);
QgsDebugMsg("Rendering done in " + QString("%1").arg(renderTime.elapsed() / 1000.0) + " seconds");
#endif

mDrawing = false;

0 comments on commit 883c073

Please sign in to comment.