Skip to content
Permalink
Browse files

Use layer method for unique values in query builder and old symbology

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15311 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Mar 2, 2011
1 parent f5fdf2f commit 1a603662d1ca26d9e84981c88f27e73c429d3211
Showing with 3 additions and 4 deletions.
  1. +1 −1 src/app/qgsquerybuilder.cpp
  2. +2 −3 src/app/qgsuniquevaluedialog.cpp
@@ -98,7 +98,7 @@ void QgsQueryBuilder::fillValues( int idx, int limit )

// determine the field type
QList<QVariant> values;
mLayer->dataProvider()->uniqueValues( idx, values, limit );
mLayer->uniqueValues( idx, values, limit );

for ( int i = 0; i < values.size(); i++ )
{
@@ -293,8 +293,7 @@ void QgsUniqueValueDialog::changeClassificationAttribute()
}
mOldClassificationAttribute = attributeName;

QgsVectorDataProvider *provider = dynamic_cast<QgsVectorDataProvider *>( mVectorLayer->dataProvider() );
if ( provider )
if ( mVectorLayer )
{
int nr = mClassificationComboBox->itemData( mClassificationComboBox->currentIndex() ).toInt();
if ( nr == -1 )
@@ -303,7 +302,7 @@ void QgsUniqueValueDialog::changeClassificationAttribute()
}

QList<QVariant> values;
provider->uniqueValues( nr, values );
mVectorLayer->uniqueValues( nr, values );

for ( int i = 0; i < values.size(); i++ )
{

0 comments on commit 1a60366

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