Skip to content
Permalink
Browse files

change color map labels to more compact format

  • Loading branch information
pierstitus authored and nyalldawson committed Apr 5, 2016
1 parent 103ab0d commit 250748b26e2e2bcfb7a388bdb28f9adb74645605
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
@@ -354,9 +354,9 @@ void QgsSingleBandPseudoColorRendererWidget::on_mClassifyButton_clicked()
for ( ; value_it != entryValues.end(); ++value_it, ++color_it )
{
QTreeWidgetItem* newItem = new QTreeWidgetItem( mColormapTreeWidget );
newItem->setText( 0, QString::number( *value_it, 'f' ) );
newItem->setText( 0, QString::number( *value_it, 'g' ) );
newItem->setBackground( 1, QBrush( *color_it ) );
newItem->setText( 2, QString::number( *value_it, 'f' ) );
newItem->setText( 2, QString::number( *value_it, 'g' ) );
newItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable );
}
emit widgetChanged();
@@ -392,7 +392,7 @@ void QgsSingleBandPseudoColorRendererWidget::populateColormapTreeWidget( const Q
for ( ; it != colorRampItems.constEnd(); ++it )
{
QTreeWidgetItem* newItem = new QTreeWidgetItem( mColormapTreeWidget );
newItem->setText( 0, QString::number( it->value, 'f' ) );
newItem->setText( 0, QString::number( it->value, 'g' ) );
newItem->setBackground( 1, QBrush( it->color ) );
newItem->setText( 2, it->label );
}
@@ -635,7 +635,7 @@ void QgsSingleBandPseudoColorRendererWidget::setFromRenderer( const QgsRasterRen
for ( ; it != colorRampItemList.end(); ++it )
{
QTreeWidgetItem* newItem = new QTreeWidgetItem( mColormapTreeWidget );
newItem->setText( 0, QString::number( it->value, 'f' ) );
newItem->setText( 0, QString::number( it->value, 'g' ) );
newItem->setBackground( 1, QBrush( it->color ) );
newItem->setText( 2, it->label );
}

0 comments on commit 250748b

Please sign in to comment.
You can’t perform that action at this time.