Skip to content
Browse files
When loading a project file, restore the canvas extent to that provid…
…ed in the project file (i.e. the extent in existence when the project file was saved). Previously the extent was the maximum extent across all layers.

I'm not sure why this functionality hasn't been done before, as it seemed so trivial to implement?

The main benefit to its implementation is that in large layers, the user doesn't have to wait for the whole layer to draw before he can restart work on a project (which is particularly important since we currently can no longer hit Esc to halt a redraw).

git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
morb_au committed Jul 20, 2006
1 parent a165cb6 commit f082966d64112e4f864c39577f9e3ae408ca5860
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/gui/qgsproject.cpp
@@ -1098,6 +1098,8 @@ bool QgsProject::read()
// get the map layers
pair< bool, list<QDomNode> > getMapLayersResults = _getMapLayers(*doc);

// Restore the map canvas extent

QgsRect savedExtent;

if (!_getExtents(*doc, savedExtent))
@@ -1114,6 +1116,15 @@ bool QgsProject::read()

// return false;
if (canvas)

// review the integrity of the retrieved map layers

if ( ! getMapLayersResults.first )

0 comments on commit f082966

Please sign in to comment.