mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix for ticket #296 - the layer's coordinates have been projected also with projections disabled.
Grrr... why there are 2 different implementations for zoom to layer extent?! 1. QgisApp 2. QgsLegend git-svn-id: http://svn.osgeo.org/qgis/trunk@5960 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
75b6817736
commit
e1718bbc29
@ -1702,14 +1702,16 @@ void QgsLegend::zoomToLayerExtent()
|
||||
if(theLayer)
|
||||
{
|
||||
layerExtent = theLayer->extent();
|
||||
ct = theLayer->coordinateTransform();
|
||||
if(ct)
|
||||
{
|
||||
|
||||
if (QgsProject::instance()->readNumEntry("SpatialRefSys", "/ProjectionsEnabled",0) != 0
|
||||
&& (ct = theLayer->coordinateTransform()))
|
||||
{
|
||||
//transform layer extent to canvas coordinate system
|
||||
transformedExtent = ct->transform(layerExtent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// do not transform when projections are not enabled
|
||||
transformedExtent = layerExtent;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user