[QGIS Commit] r12412 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Dec 11 15:45:24 EST 2009


Author: jef
Date: 2009-12-11 15:45:22 -0500 (Fri, 11 Dec 2009)
New Revision: 12412

Modified:
   trunk/qgis/src/app/qgsrasterlayerproperties.cpp
Log:
fix #2233

Modified: trunk/qgis/src/app/qgsrasterlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.cpp	2009-12-11 19:27:15 UTC (rev 12411)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.cpp	2009-12-11 20:45:22 UTC (rev 12412)
@@ -281,14 +281,14 @@
       if (( *myRasterPyramidIterator ).exists == true )
       {
         lbxPyramidResolutions->addItem( new QListWidgetItem( myPyramidPixmap,
-                                        QString::number(( *myRasterPyramidIterator ).xDim ) + QString( " x " ) +
-                                        QString::number(( *myRasterPyramidIterator ).yDim ) ) );
+                                        QString::number( myRasterPyramidIterator->xDim ) + QString( " x " ) +
+                                        QString::number( myRasterPyramidIterator->yDim ) ) );
       }
       else
       {
         lbxPyramidResolutions->addItem( new QListWidgetItem( myNoPyramidPixmap,
-                                        QString::number(( *myRasterPyramidIterator ).xDim ) + QString( " x " ) +
-                                        QString::number(( *myRasterPyramidIterator ).yDim ) ) );
+                                        QString::number( myRasterPyramidIterator->xDim ) + QString( " x " ) +
+                                        QString::number( myRasterPyramidIterator->yDim ) ) );
       }
     }
   }
@@ -557,14 +557,28 @@
 
   if ( mRasterLayerIsWms )
   {
-    tabBar->setCurrentWidget( tabPageMetadata );
+    QListWidgetItem *symbologyItem = listWidget->item( 0 );
+    QListWidgetItem *colormapItem = listWidget->item( 2 );
+    QListWidgetItem *metadataItem = listWidget->item( 4 );
+    QListWidgetItem *pyramidItem = listWidget->item( 5 );
+    QListWidgetItem *histogramItem = listWidget->item( 6 );
+
+    delete symbologyItem;
+    delete colormapItem;
+    delete pyramidItem;
+    delete histogramItem;
+
+    tabBar->removeWidget( tabPageSymbology );
     tabBar->removeWidget( tabPageColormap );
-    tabBar->removeWidget( tabPageSymbology );
+    tabBar->removeWidget( tabPagePyramids );
+    tabBar->removeWidget( tabPageHistogram );
+
     gboxNoDataValue->setEnabled( false );
     gboxCustomTransparency->setEnabled( false );
-    tabBar->removeWidget( tabPageHistogram );
-    tabBar->removeWidget( tabPagePyramids );
+
+    listWidget->setCurrentItem( metadataItem );
   }
+
 #if 0
   if ( mRasterLayer->rasterType() == QgsRasterLayer::Multiband )
   {
@@ -1607,14 +1621,14 @@
     if (( *myRasterPyramidIterator ).exists == true )
     {
       lbxPyramidResolutions->addItem( new QListWidgetItem( myPyramidPixmap,
-                                      QString::number(( *myRasterPyramidIterator ).xDim ) + QString( " x " ) +
-                                      QString::number(( *myRasterPyramidIterator ).yDim ) ) );
+                                      QString::number( myRasterPyramidIterator->xDim ) + QString( " x " ) +
+                                      QString::number( myRasterPyramidIterator->yDim ) ) );
     }
     else
     {
       lbxPyramidResolutions->addItem( new QListWidgetItem( myNoPyramidPixmap,
-                                      QString::number(( *myRasterPyramidIterator ).xDim ) + QString( " x " ) +
-                                      QString::number(( *myRasterPyramidIterator ).yDim ) ) );
+                                      QString::number( myRasterPyramidIterator->xDim ) + QString( " x " ) +
+                                      QString::number( myRasterPyramidIterator->yDim ) ) );
     }
   }
   //update the legend pixmap



More information about the QGIS-commit mailing list