File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -373,6 +373,11 @@ void QgsVectorDataProvider::fillMinMaxCache()
373
373
mCacheMinValues [it.key ()] = QVariant ( DBL_MAX );
374
374
mCacheMaxValues [it.key ()] = QVariant ( -DBL_MAX );
375
375
}
376
+ else
377
+ {
378
+ mCacheMinValues [it.key ()] = QVariant ();
379
+ mCacheMaxValues [it.key ()] = QVariant ();
380
+ }
376
381
}
377
382
378
383
QgsFeature f;
@@ -402,6 +407,18 @@ void QgsVectorDataProvider::fillMinMaxCache()
402
407
if ( value > mCacheMaxValues [*it].toDouble () )
403
408
mCacheMaxValues [*it] = value;
404
409
}
410
+ else
411
+ {
412
+ QString value = varValue.toString ();
413
+ if ( mCacheMinValues [*it].isNull () || value < mCacheMinValues [*it].toString () )
414
+ {
415
+ mCacheMinValues [*it] = value;
416
+ }
417
+ if ( mCacheMaxValues [*it].isNull () || value > mCacheMinValues [*it].toString () )
418
+ {
419
+ mCacheMaxValues [*it] = value;
420
+ }
421
+ }
405
422
}
406
423
}
407
424
You can’t perform that action at this time.
0 commit comments