Patch_for_the_bug__3697.2.diff
src/core/qgsmaprenderer.cpp (working copy) | ||
---|---|---|
838 | 838 |
// We can't use a constructor since QgsRectangle normalizes the rectangle upon construction |
839 | 839 |
mFullExtent.setMinimal(); |
840 | 840 | |
841 |
QList<QString> list = registry->mapLayers().keys(); |
|
841 | 842 |
// iterate through the map layers and test each layers extent |
842 | 843 |
// against the current min and max values |
843 |
QStringList::iterator it = mLayerSet.begin();
|
|
844 |
while ( it != mLayerSet.end() )
|
|
844 |
QStringList::iterator it = list.begin();
|
|
845 |
while ( it != list.end() )
|
|
845 | 846 |
{ |
846 | 847 |
QgsMapLayer * lyr = registry->mapLayer( *it ); |
847 | 848 |
if ( lyr == NULL ) |
... | ... | |
861 | 862 |
mFullExtent.unionRect( extent ); |
862 | 863 | |
863 | 864 |
} |
864 |
it++;
|
|
865 |
++it;
|
|
865 | 866 |
} |
866 | 867 | |
867 | 868 |
if ( mFullExtent.width() == 0.0 || mFullExtent.height() == 0.0 ) |