Skip to content

Commit

Permalink
Value label for colortable rasters
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jun 14, 2011
1 parent e28d1e4 commit ed6df31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -2406,6 +2406,7 @@ void QgsRasterLayerProperties::on_mClassifyButton_clicked()
QTreeWidgetItem* newItem = new QTreeWidgetItem( mColormapTreeWidget );
newItem->setText( 0, QString::number( *value_it, 'f' ) );
newItem->setBackground( 1, QBrush( *color_it ) );
newItem->setText( 2, QString::number( *value_it, 'f' ) );
newItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable );
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -995,8 +995,8 @@ QList<QgsColorRampShader::ColorRampItem> QgsGdalProvider::colorTable( int theBan
else if ( myColorInterpretation == GCI_PaletteIndex )
{
QgsColorRampShader::ColorRampItem myColorRampItem;
myColorRampItem.label = "";
myColorRampItem.value = ( double )myIterator;
myColorRampItem.label = QString::number( myColorRampItem.value );
//Branch on palette interpretation
if ( myPaletteInterpretation == GPI_RGB )
{
Expand Down

0 comments on commit ed6df31

Please sign in to comment.