Data items: Close GDAL dataset when it is not needed

This was leading to situations where QGIS was hitting limit of the maximum open files
This commit is contained in:
Martin Dobias 2015-06-26 18:04:25 +08:00
parent b80a1bcac5
commit 7532000706

View File

@ -43,7 +43,10 @@ QgsGdalLayerItem::QgsGdalLayerItem( QgsDataItem* parent,
GDALDatasetH hDS = GDALOpen( TO8F( mPath ), GA_Update );
if ( hDS )
{
mCapabilities |= SetCrs;
GDALClose( hDS );
}
}
QgsGdalLayerItem::~QgsGdalLayerItem()