Skip to content

Commit 37f31dd

Browse files
committed
Get config from arguments instead of querying fields
1 parent 29f6484 commit 37f31dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/fieldformatter/qgsrangefieldformatter.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ QString QgsRangeFieldFormatter::representValue( QgsVectorLayer *layer, int field
5353
const QgsField field = layer->fields().at( fieldIndex );
5454

5555
if ( field.type() == QVariant::Double &&
56-
field.editorWidgetSetup().config().contains( QStringLiteral( "Precision" ) ) &&
56+
config.contains( QStringLiteral( "Precision" ) ) &&
5757
value.isValid( ) )
5858
{
5959
bool ok;
6060
double val( value.toDouble( &ok ) );
6161
if ( ok )
6262
{
63-
int precision( field.editorWidgetSetup().config()[ QStringLiteral( "Precision" ) ].toInt( &ok ) );
63+
int precision( config[ QStringLiteral( "Precision" ) ].toInt( &ok ) );
6464
if ( ok )
6565
{
6666
// TODO: make the format configurable!

0 commit comments

Comments
 (0)