Nailed a serious bug - the gdal dataset was bing closed prematurely during pyramid generation causing it to fail. Refresh metadata in raster props tab after rasters created.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@1450 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2004-05-21 23:16:18 +00:00
parent 251f566ca4
commit 1097e2e9ea
2 changed files with 8 additions and 6 deletions

View File

@ -2377,13 +2377,13 @@ void QgsRasterLayer::buildPyramids(RasterPyramidList theRasterPyramidList)
//make sure the raster knows it has pyramids
hasPyramidsFlag=true;
}
std::cout << "Pyramid overviews built" << std::endl;
//close the gdal dataset and reopen it in read only mode
delete gdalDataset;
gdalDataset = (GDALDataset *) GDALOpen(dataSource, GA_ReadOnly);
emit setProgress(0,0);
}
std::cout << "Pyramid overviews built" << std::endl;
//close the gdal dataset and reopen it in read only mode
delete gdalDataset;
gdalDataset = (GDALDataset *) GDALOpen(dataSource, GA_ReadOnly);
emit setProgress(0,0);
}
RasterPyramidList QgsRasterLayer::buildRasterPyramidList()
{

View File

@ -754,7 +754,7 @@ void QgsRasterLayerProperties::buttonBuildPyramids_clicked()
if ( myItem->isSelected() )
{
//mark to be pyramided
myPyramidList[myCounterInt].existsFlag=true;
myPyramidList[myCounterInt+1].existsFlag=true;
}
}
//
@ -791,5 +791,7 @@ void QgsRasterLayerProperties::buttonBuildPyramids_clicked()
pixmapLegend->repaint(false);
QgsLegendItem *myLegendItem = rasterLayer->legendItem();
((QCheckListItem *) myLegendItem)->setPixmap(0, *rasterLayer->legendPixmap());
//populate the metadata tab's text browser widget with gdal metadata info
txtbMetadata->setText(rasterLayer->getMetadata());
}