From: vsr Date: Fri, 4 Jun 2010 11:52:29 +0000 (+0000) Subject: 0020580: EDF 1169 GEOM: float number precision in dialog boxes X-Git-Tag: V5_1_4rc2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d68a9a960108df6e3c0cbb887c6f7e365bfe5d62;p=modules%2Fgeom.git 0020580: EDF 1169 GEOM: float number precision in dialog boxes Additional small bug fix (resources) in sketcher dialog box --- diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index 377793d66..2895ea89f 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -1653,15 +1653,15 @@ void EntityGUI_SketcherDlg::initSpinBox( SalomeApp_DoubleSpinBox* spinBox, int aPrecision = resMgr->integerValue( "Geometry", quantity, 6 ); spinBox->setPrecision( aPrecision ); - spinBox->setDecimals( aPrecision ); // it's necessary to set decimals before the range setting, - // by default Qt rounds boundaries to 2 decimals at setRange + spinBox->setDecimals( qAbs( aPrecision ) ); // it's necessary to set decimals before the range setting, + // by default Qt rounds boundaries to 2 decimals at setRange spinBox->setRange( min, max ); spinBox->setSingleStep( step ); // Add a hint for the user saying how to tune precision - QString userPropName = QObject::tr( QString( "PREF_%1" ).arg( quantity ).toLatin1().constData() ); + QString userPropName = QObject::tr( QString( "GEOM_PREF_%1" ).arg( quantity ).toLatin1().constData() ); spinBox->setProperty( "validity_tune_hint", - QVariant( QObject::tr( "PRECISION_HINT" ).arg( userPropName ) ) ); + QVariant( QObject::tr( "GEOM_PRECISION_HINT" ).arg( userPropName ) ) ); } //=================================================================================