Skip to content

Commit

Permalink
Fix for ticket #238 (zoom to map fails on startup). If there are no c…
Browse files Browse the repository at this point in the history
…ommand line

 arguments, the extent is -1,-1,1,1, but if there, the extent is determined by t
he layers loaded.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5703 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Aug 17, 2006
1 parent b61cda3 commit fce6603
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/gui/main.cpp
Expand Up @@ -230,8 +230,13 @@ int main(int argc, char *argv[])
// save the image to disk and then exit
QString mySnapshotFileName="";

// This behaviour will set initial extent of map canvas
QString myInitialExtent="-1,-1,1,1";
// This behaviour will set initial extent of map canvas, but only if
// there are no command line arguments. This gives a usable map
// extent when qgis starts with no layers loaded. When layers are
// loaded, we let the layers define the initial extent.
QString myInitialExtent="";
if (argc == 1)
myInitialExtent="-1,-1,1,1";

// This behaviour will allow you to force the use of a translation file
// which is useful for testing
Expand Down

0 comments on commit fce6603

Please sign in to comment.