Skip to content

Commit dafc6db

Browse files
author
mhugent
committed
Use layer method for unique values in query builder and old symbology
git-svn-id: http://svn.osgeo.org/qgis/trunk@15311 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2c0e214 commit dafc6db

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/app/qgsquerybuilder.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void QgsQueryBuilder::fillValues( int idx, int limit )
9898

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

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

src/app/qgsuniquevaluedialog.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,7 @@ void QgsUniqueValueDialog::changeClassificationAttribute()
293293
}
294294
mOldClassificationAttribute = attributeName;
295295

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

305304
QList<QVariant> values;
306-
provider->uniqueValues( nr, values );
305+
mVectorLayer->uniqueValues( nr, values );
307306

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

0 commit comments

Comments
 (0)