@@ -721,28 +721,28 @@ static QString _getVersion(QDomDocument const &doc)
721
721
*/
722
722
static QgsMapCanvas * _findMapCanvas (QString const &canonicalMapCanvasName)
723
723
{
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 ;
735
725
726
+ QWidgetList wlist = QApplication::topLevelWidgets ();
727
+ foreach (QWidget *widget, QApplication::topLevelWidgets ())
728
+ {
729
+ theMapCanvas = dynamic_cast <QgsMapCanvas *>(widget->child (canonicalMapCanvasName));
736
730
if (theMapCanvas)
737
731
{
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 ;
744
733
}
734
+ }
735
+
736
+ if (theMapCanvas)
737
+ {
738
+ return theMapCanvas;
739
+ }
740
+ else
741
+ {
742
+ qDebug ((" Unable to find canvas widget " + canonicalMapCanvasName).toLocal8Bit ().data ());
745
743
744
+ return 0x0 ; // XXX some sort of error value? Exception?
745
+ }
746
746
} // _findMapCanvas
747
747
748
748
@@ -1125,9 +1125,7 @@ bool QgsProject::read()
1125
1125
1126
1126
// ensure that overview map canvas is set to *entire* extent
1127
1127
QgsRect mapCanvasFullExtent = _getFullExtent (" theMapCanvas" );
1128
- std::cerr <<__FILE__<<__LINE__<<' \n ' ;
1129
1128
_setCanvasExtent (" theOverviewCanvas" , mapCanvasFullExtent);
1130
- std::cerr <<__FILE__<<__LINE__<<' \n ' ;
1131
1129
// now restore the extent for the main canvas
1132
1130
_setCanvasExtent (" theMapCanvas" , savedExtent);
1133
1131
0 commit comments