Navigation Menu

Skip to content

Commit

Permalink
[bugfix] Fixes float input in advanced digitizing ...
Browse files Browse the repository at this point in the history
... 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 fc66172
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsadvanceddigitizingdockwidget.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit fc66172

Please sign in to comment.