mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix for ticket #238 (zoom to map fails on startup). If there are no command 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
This commit is contained in:
parent
b61cda3248
commit
fce66036cf
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user