From d68a9a960108df6e3c0cbb887c6f7e365bfe5d62 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 4 Jun 2010 11:52:29 +0000 Subject: [PATCH] 0020580: EDF 1169 GEOM: float number precision in dialog boxes Additional small bug fix (resources) in sketcher dialog box --- src/EntityGUI/EntityGUI_SketcherDlg.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ) ) ); } //=================================================================================