Skip to content
Permalink
Browse files

[bugfix] Fixes float input in advanced digitizing ...

... with not-dot locales

Fixes #18102 - Can only input integer value in the vertex editor

Precision is hardcoded to 6 decimal places, we can either increase it
or make it configurable.
  • Loading branch information
elpaso committed Sep 17, 2018
1 parent b6dba2d commit fc6617251d8b253ca0b36dd5ae5dfd4415618529
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/gui/qgsadvanceddigitizingdockwidget.cpp
@@ -310,7 +310,7 @@ QgsAdvancedDigitizingDockWidget::CadConstraint *QgsAdvancedDigitizingDockWidget:
double QgsAdvancedDigitizingDockWidget::parseUserInput( const QString &inputValue, bool &ok ) const
{
ok = false;
double value = inputValue.toDouble( &ok );
double value = qgsPermissiveToDouble( inputValue, ok );
if ( ok )
{
return value;
@@ -1092,7 +1092,7 @@ void QgsAdvancedDigitizingDockWidget::CadConstraint::setValue( double value, boo
{
mValue = value;
if ( updateWidget )
mLineEdit->setText( QString::number( value, 'f' ) );
mLineEdit->setText( QLocale().toString( value, 'f', 6 ) );
}

void QgsAdvancedDigitizingDockWidget::CadConstraint::toggleLocked()

0 comments on commit fc66172

Please sign in to comment.
You can’t perform that action at this time.