Skip to content

Commit 2bf72b7

Browse files
committedSep 2, 2018
Use isNumeric
1 parent 069dc1b commit 2bf72b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/gui/editorwidgets/qgstexteditwrapper.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ void QgsTextEditWrapper::setWidgetValue( const QVariant &val )
225225
// when the user is editing the field value.
226226
// We are checking for editable layer because in the form field context we do not
227227
// want to strip the separator unless the layer is editable
228-
if ( layer() && layer()->isEditable() && ! QLocale().groupSeparator().isNull() && ( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong ) )
228+
if ( layer() && layer()->isEditable() && ! QLocale().groupSeparator().isNull() && field().isNumeric() )
229229
{
230230
v = v.remove( QLocale().groupSeparator() );
231231
}

0 commit comments

Comments
 (0)
Please sign in to comment.