Skip to content

Commit e96e1bf

Browse files
author
timlinux
committedOct 7, 2008
Fix bug where quantiles and empty classification types werent showing preview symbols in layer props. Also used some better var names in cont col dlg
git-svn-id: http://svn.osgeo.org/qgis/trunk@9453 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a185c78 commit e96e1bf

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed
 

‎src/app/qgscontinuouscolordialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
4444
if ( provider )
4545
{
4646
const QgsFieldMap & fields = provider->fields();
47-
int fieldnumber( 0 ), combonumber( 0 );
47+
int fieldNumber( 0 ), comboNumber( 0 );
4848
QString str;
4949

5050
for ( QgsFieldMap::const_iterator it = fields.begin(); it != fields.end(); ++it )
@@ -54,10 +54,10 @@ QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
5454
{
5555
str = ( *it ).name();
5656
classificationComboBox->addItem( str );
57-
mFieldMap.insert( std::make_pair( combonumber, fieldnumber ) );
58-
combonumber++;
57+
mFieldMap.insert( std::make_pair( comboNumber, fieldNumber ) );
58+
comboNumber++;
5959
}
60-
fieldnumber++;
60+
fieldNumber++;
6161
}
6262
}
6363
else

‎src/app/qgsgraduatedsymboldialog.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,9 @@ void QgsGraduatedSymbolDialog::adjustClassification()
307307
if ( last_it != quantileBorders.end() )
308308
{
309309
listBoxText = QString::number( *last_it, 'f' ) + " - " + QString::number( *it, 'f' );
310-
mClassListWidget->addItem( listBoxText );
310+
QListWidgetItem *mypItem = new QListWidgetItem( listBoxText );
311+
mClassListWidget->addItem( mypItem );
312+
updateEntryIcon( *symbol_it, mypItem );
311313
( *symbol_it )->setLowerValue( QString::number( *last_it, 'f' ) );
312314
( *symbol_it )->setUpperValue( QString::number( *it, 'f' ) );
313315
mEntries.insert( std::make_pair( listBoxText, *symbol_it ) );
@@ -348,7 +350,9 @@ void QgsGraduatedSymbolDialog::adjustClassification()
348350
for ( int i = 0;i < numberofclassesspinbox->value();++i )
349351
{
350352
listBoxText = "Empty" + QString::number( i + 1 );
351-
mClassListWidget->addItem( listBoxText );
353+
QListWidgetItem * mypItem = new QListWidgetItem( listBoxText );
354+
updateEntryIcon( *symbol_it, mypItem );
355+
mClassListWidget->addItem( mypItem );
352356
mEntries.insert( std::make_pair( listBoxText, *symbol_it ) );
353357
++symbol_it;
354358
}

0 commit comments

Comments
 (0)
Please sign in to comment.