Skip to content

Commit

Permalink
Tidy up indenting.
Browse files Browse the repository at this point in the history
Remove two unnecessary debugging output lines


git-svn-id: http://svn.osgeo.org/qgis/trunk@5190 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Apr 6, 2006
1 parent 5ba27a0 commit 437e031
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions src/gui/qgsproject.cpp
Expand Up @@ -721,28 +721,28 @@ static QString _getVersion(QDomDocument const &doc)
*/
static QgsMapCanvas * _findMapCanvas(QString const &canonicalMapCanvasName)
{
QgsMapCanvas * theMapCanvas = 0x0;

QWidgetList wlist = QApplication::topLevelWidgets();
foreach (QWidget *widget, QApplication::topLevelWidgets())
{
theMapCanvas = dynamic_cast <QgsMapCanvas *>(widget->child(canonicalMapCanvasName));
if(theMapCanvas)
{
break;
}
}
QgsMapCanvas * theMapCanvas = 0x0;

QWidgetList wlist = QApplication::topLevelWidgets();
foreach (QWidget *widget, QApplication::topLevelWidgets())
{
theMapCanvas = dynamic_cast <QgsMapCanvas *>(widget->child(canonicalMapCanvasName));
if (theMapCanvas)
{
return theMapCanvas;
} else
{
qDebug(("Unable to find canvas widget " + canonicalMapCanvasName).toLocal8Bit().data());

return 0x0; // XXX some sort of error value? Exception?
break;
}
}

if (theMapCanvas)
{
return theMapCanvas;
}
else
{
qDebug(("Unable to find canvas widget " + canonicalMapCanvasName).toLocal8Bit().data());

return 0x0; // XXX some sort of error value? Exception?
}
} // _findMapCanvas


Expand Down Expand Up @@ -1125,9 +1125,7 @@ bool QgsProject::read()

// ensure that overview map canvas is set to *entire* extent
QgsRect mapCanvasFullExtent = _getFullExtent("theMapCanvas");
std::cerr <<__FILE__<<__LINE__<<'\n';
_setCanvasExtent("theOverviewCanvas", mapCanvasFullExtent);
std::cerr <<__FILE__<<__LINE__<<'\n';
// now restore the extent for the main canvas
_setCanvasExtent("theMapCanvas", savedExtent);

Expand Down

0 comments on commit 437e031

Please sign in to comment.