mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-28 18:30:36 +05:00
0020580: EDF 1169 GEOM: float number precision in dialog boxes
Additional small bug fix (resources) in sketcher dialog box
This commit is contained in:
parent
7c20a00c5f
commit
d68a9a9601
@ -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 ) ) );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user