Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 b50cead
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/gui/qgsmaplayer.cpp
Expand Up @@ -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();
Expand All @@ -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);
}

Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit b50cead

Please sign in to comment.