Skip to content
Permalink
Browse files
Removed crash in 0.8 when reading project files from 0.9. Also remove…
…d compiler warnings

git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@6823 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Mar 20, 2007
1 parent 68dcf57 commit b50cead442b1de244f06253560a5730cfa2f4d98
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/gui/qgsmaplayer.cpp
@@ -231,8 +231,6 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
QDomElement mne = mnl.toElement();
dataSource = mne.text();

const char * dataSourceStr = dataSource.toLocal8Bit().data(); // debugger probe

// the internal name is just the data source basename
QFileInfo dataSourceFileInfo( dataSource );
internalName = dataSourceFileInfo.baseName();
@@ -252,16 +250,15 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
mne = mnl.toElement();
setLayerName( mne.text() );

const char * layerNameStr = mne.text().toLocal8Bit().data(); // debugger probe



//read srs
QDomNode srsNode = layer_node.namedItem("coordinatetransform");

mCoordinateTransform=new QgsCoordinateTransform();
if( ! srsNode.isNull() )
{
qDebug("Reading coordinatetransform from project file");
mCoordinateTransform=new QgsCoordinateTransform();
mCoordinateTransform->readXML(srsNode);
}

@@ -681,7 +678,7 @@ QgsRect QgsMapLayer::calcProjectedBoundingBox(QgsRect& extent)
double xmax = std::numeric_limits<double>::min();
double ymin = std::numeric_limits<double>::max();
double ymax = std::numeric_limits<double>::min();
for (int i = 0; i < top.size(); ++i)
for (unsigned int i = 0; i < top.size(); ++i)
{
xmin = std::min(xmin, left[i].x());
xmax = std::max(xmax, right[i].x());

0 comments on commit b50cead

Please sign in to comment.