Skip to content

Commit

Permalink
change color map labels to more compact format
Browse files Browse the repository at this point in the history
  • Loading branch information
pierstitus authored and nyalldawson committed Jun 2, 2016
1 parent 103ab0d commit 250748b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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 );
}
Expand Down

0 comments on commit 250748b

Please sign in to comment.