File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -408,11 +408,12 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
408
408
mGeometryPrecisionLineEdit ->setValidator ( new QDoubleValidator ( mGeometryPrecisionLineEdit ) );
409
409
410
410
mRemoveDuplicateNodesCheckbox ->setChecked ( mLayer ->geometryOptions ()->removeDuplicateNodes () );
411
+ double precision ( mLayer ->geometryOptions ()->geometryPrecision () );
411
412
bool ok = true ;
412
- QString precision ( QLocale ().toString ( mLayer -> geometryOptions ()-> geometryPrecision () , ok ) );
413
- if ( ! ok )
414
- precision = 0.0 ;
415
- mGeometryPrecisionLineEdit ->setText ( precision );
413
+ QString precisionStr ( QLocale ().toString ( precision , ok ) );
414
+ if ( precision == 0.0 || ! ok )
415
+ precisionStr = QString () ;
416
+ mGeometryPrecisionLineEdit ->setText ( precisionStr );
416
417
417
418
mPrecisionUnitsLabel ->setText ( QStringLiteral ( " [%1]" ).arg ( QgsUnitTypes::toAbbreviatedString ( mLayer ->crs ().mapUnits () ) ) );
418
419
You can’t perform that action at this time.
0 commit comments