Skip to content

Commit

Permalink
Fix bug where quantiles and empty classification types werent showing…
Browse files Browse the repository at this point in the history
… preview symbols in layer props. Also used some better var names in cont col dlg

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9453 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 7, 2008
1 parent c0a2d9c commit f1d098f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/app/qgscontinuouscolordialog.cpp
Expand Up @@ -44,7 +44,7 @@ QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
if ( provider )
{
const QgsFieldMap & fields = provider->fields();
int fieldnumber( 0 ), combonumber( 0 );
int fieldNumber( 0 ), comboNumber( 0 );
QString str;

for ( QgsFieldMap::const_iterator it = fields.begin(); it != fields.end(); ++it )
Expand All @@ -54,10 +54,10 @@ QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
{
str = ( *it ).name();
classificationComboBox->addItem( str );
mFieldMap.insert( std::make_pair( combonumber, fieldnumber ) );
combonumber++;
mFieldMap.insert( std::make_pair( comboNumber, fieldNumber ) );
comboNumber++;
}
fieldnumber++;
fieldNumber++;
}
}
else
Expand Down
8 changes: 6 additions & 2 deletions src/app/qgsgraduatedsymboldialog.cpp
Expand Up @@ -307,7 +307,9 @@ void QgsGraduatedSymbolDialog::adjustClassification()
if ( last_it != quantileBorders.end() )
{
listBoxText = QString::number( *last_it, 'f' ) + " - " + QString::number( *it, 'f' );
mClassListWidget->addItem( listBoxText );
QListWidgetItem *mypItem = new QListWidgetItem( listBoxText );
mClassListWidget->addItem( mypItem );
updateEntryIcon( *symbol_it, mypItem );
( *symbol_it )->setLowerValue( QString::number( *last_it, 'f' ) );
( *symbol_it )->setUpperValue( QString::number( *it, 'f' ) );
mEntries.insert( std::make_pair( listBoxText, *symbol_it ) );
Expand Down Expand Up @@ -348,7 +350,9 @@ void QgsGraduatedSymbolDialog::adjustClassification()
for ( int i = 0;i < numberofclassesspinbox->value();++i )
{
listBoxText = "Empty" + QString::number( i + 1 );
mClassListWidget->addItem( listBoxText );
QListWidgetItem * mypItem = new QListWidgetItem( listBoxText );
updateEntryIcon( *symbol_it, mypItem );
mClassListWidget->addItem( mypItem );
mEntries.insert( std::make_pair( listBoxText, *symbol_it ) );
++symbol_it;
}
Expand Down

0 comments on commit f1d098f

Please sign in to comment.