Skip to content

Commit

Permalink
Use isNumeric
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Sep 2, 2018
1 parent 069dc1b commit 2bf72b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgstexteditwrapper.cpp
Expand Up @@ -225,7 +225,7 @@ void QgsTextEditWrapper::setWidgetValue( const QVariant &val )
// when the user is editing the field value.
// We are checking for editable layer because in the form field context we do not
// want to strip the separator unless the layer is editable
if ( layer() && layer()->isEditable() && ! QLocale().groupSeparator().isNull() && ( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong ) )
if ( layer() && layer()->isEditable() && ! QLocale().groupSeparator().isNull() && field().isNumeric() )
{
v = v.remove( QLocale().groupSeparator() );
}
Expand Down

0 comments on commit 2bf72b7

Please sign in to comment.