Skip to content

Commit 96aa671

Browse files
committedJul 16, 2018
do not set precision for datatypes that have not one
1 parent 7933c85 commit 96aa671

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/app/qgsfieldcalculator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ QgsField QgsFieldCalculator::fieldDefinition()
516516
static_cast< QVariant::Type >( mOutputFieldTypeComboBox->currentData( Qt::UserRole + FTC_TYPE_ROLE_IDX ).toInt() ),
517517
mOutputFieldTypeComboBox->currentData( Qt::UserRole + FTC_TYPE_NAME_IDX ).toString(),
518518
mOutputFieldWidthSpinBox->value(),
519-
mOutputFieldPrecisionSpinBox->value(),
519+
mOutputFieldPrecisionSpinBox->isEnabled() ? mOutputFieldPrecisionSpinBox->value() : 0,
520520
QString(),
521521
static_cast< QVariant::Type >( mOutputFieldTypeComboBox->currentData( Qt::UserRole + FTC_SUBTYPE_IDX ).toInt() )
522522
);

0 commit comments

Comments
 (0)
Please sign in to comment.