Skip to content

Commit

Permalink
Use layer method for unique values in query builder and old symbology
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15311 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 2, 2011
1 parent 2c0e214 commit dafc6db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsquerybuilder.cpp
Expand Up @@ -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++ )
{
Expand Down
5 changes: 2 additions & 3 deletions src/app/qgsuniquevaluedialog.cpp
Expand Up @@ -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 )
Expand All @@ -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++ )
{
Expand Down

0 comments on commit dafc6db

Please sign in to comment.