Disable overview widget for release. Minor bugfix in rasterlayer picker up by Larsl which is only encountered bu i8n users.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@1464 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2004-05-25 17:15:16 +00:00
parent 22ac69a68e
commit b6590839b3
2 changed files with 12 additions and 3 deletions

View File

@ -257,13 +257,19 @@ QgisApp::QgisApp(QWidget * parent, const char *name, WFlags fl):QgisAppBase(pare
QGridLayout *canvasLegendLayout = new QGridLayout(frameMain, 1, 1, 4, 6, "canvasLegendLayout");
QSplitter *canvasLegendSplit = new QSplitter(frameMain);
QGridLayout *legendOverviewLayout = new QGridLayout(canvasLegendSplit, 1, 2, 4, 6, "canvasLegendLayout");
#ifdef QGISDEBUG
QSplitter *legendOverviewSplit = new QSplitter(Qt::Vertical,canvasLegendSplit);
mapLegend = new QgsLegend(legendOverviewSplit); //frameMain);
#else
mapLegend = new QgsLegend(canvasLegendSplit); //frameMain);
mapLegend->addColumn(tr("Layers"));
mapLegend->setSorting(-1);
#endif
#ifdef QGISDEBUG
mOverviewLabel = new QLabel(legendOverviewSplit);
mOverviewLabel->setText("Overview");
#endif
// mL = new QScrollView(canvasLegendSplit);
//add a canvas
mapCanvas = new QgsMapCanvas(canvasLegendSplit);
@ -1246,11 +1252,13 @@ bool QgisApp::addRasterLayer(QFileInfo const & rasterFile)
// use this layer in the map overview - well need to move this logic elsewher later
//get the thumbnail for the layer
#ifdef QGISDEBUG
QPixmap myQPixmap = QPixmap(mOverviewLabel->width(),mOverviewLabel->height());
layer->drawThumbnail(&myQPixmap);
mOverviewLabel->setText("");
mOverviewLabel->setPixmap(myQPixmap);
#endif
// init the context menu so it can connect to slots in main app
layer->initContextMenu(this);
} else
@ -1347,12 +1355,13 @@ bool QgisApp::addRasterLayer(QStringList const &theFileNameQStringList)
// add it to the mapcanvas collection
mapCanvas->addLayer(layer);
#ifdef QGISDEBUG
//get the thumbnail for the layer
QPixmap myQPixmap = QPixmap(mOverviewLabel->width(),mOverviewLabel->height());
layer->drawThumbnail(&myQPixmap);
mOverviewLabel->setText("");
mOverviewLabel->setPixmap(myQPixmap);
#endif
projectIsDirty = true;
// init the context menu so it can connect to slots in main app

View File

@ -1722,7 +1722,7 @@ void QgsRasterLayer::setRedBandName(QString theBandNameQString)
}
//check that a valid band name was passed
for (int myIteratorInt = 0; myIteratorInt <= rasterStatsVector.size(); ++myIteratorInt)
for (int myIteratorInt = 0; myIteratorInt < rasterStatsVector.size(); ++myIteratorInt)
{
//find out the name of this band
RasterBandStats myRasterBandStats = rasterStatsVector[myIteratorInt];