Skip to content

Commit 278648d

Browse files
author
g_j_m
committed
Tidy up indenting.
Remove two unnecessary debugging output lines git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5190 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent d39e34d commit 278648d

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

src/gui/qgsproject.cpp

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -721,28 +721,28 @@ static QString _getVersion(QDomDocument const &doc)
721721
*/
722722
static QgsMapCanvas * _findMapCanvas(QString const &canonicalMapCanvasName)
723723
{
724-
QgsMapCanvas * theMapCanvas = 0x0;
725-
726-
QWidgetList wlist = QApplication::topLevelWidgets();
727-
foreach (QWidget *widget, QApplication::topLevelWidgets())
728-
{
729-
theMapCanvas = dynamic_cast <QgsMapCanvas *>(widget->child(canonicalMapCanvasName));
730-
if(theMapCanvas)
731-
{
732-
break;
733-
}
734-
}
724+
QgsMapCanvas * theMapCanvas = 0x0;
735725

726+
QWidgetList wlist = QApplication::topLevelWidgets();
727+
foreach (QWidget *widget, QApplication::topLevelWidgets())
728+
{
729+
theMapCanvas = dynamic_cast <QgsMapCanvas *>(widget->child(canonicalMapCanvasName));
736730
if (theMapCanvas)
737731
{
738-
return theMapCanvas;
739-
} else
740-
{
741-
qDebug(("Unable to find canvas widget " + canonicalMapCanvasName).toLocal8Bit().data());
742-
743-
return 0x0; // XXX some sort of error value? Exception?
732+
break;
744733
}
734+
}
735+
736+
if (theMapCanvas)
737+
{
738+
return theMapCanvas;
739+
}
740+
else
741+
{
742+
qDebug(("Unable to find canvas widget " + canonicalMapCanvasName).toLocal8Bit().data());
745743

744+
return 0x0; // XXX some sort of error value? Exception?
745+
}
746746
} // _findMapCanvas
747747

748748

@@ -1125,9 +1125,7 @@ bool QgsProject::read()
11251125

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

0 commit comments

Comments
 (0)