QLabel* LabelDeformation2 = new QLabel (tr("LBL_DEFROMATION_SCALE"), GDeformation);
GDeformationLayout->addWidget( LabelDeformation2, 1, 0 );
- myScaleSpn = new QtxDoubleSpinBox (0.0, 1.0E+38, 0.1, aPrecision*(-1), 38, GDeformation);
+ myScaleSpn = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 38, GDeformation);
myScaleSpn->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
GDeformationLayout->addWidget( myScaleSpn, 1, 1 );
connect(myVectorialFieldCombo, SIGNAL(activated(int)), this, SLOT(onVectorialFieldChanged(int)));
void VisuGUI_CutPlanesPane::setScaleFactor(double theFactor){
double i=0.1;
- while (1) { // Calculate Step & Precission
- if ( int (theFactor/i) >= 0)
- break;
- else {
- i = i*0.1;
+ if (theFactor > 0) {
+ while (1) { // Calculate Step & Precission
+ if ( int (theFactor/i) >= 0)
+ break;
+ else
+ i = i*0.1;
}
}
myScaleSpn->setSingleStep(i);
myScaleSpn->setValue(theFactor);
-
}
void VisuGUI_CutPlanesPane::createPlanes()
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
- ScalFact = new QtxDoubleSpinBox (1.0E-20, 1.0E+38, 0.1, aPrecision*(-1), 32, TopGroup);
+ ScalFact = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 32, TopGroup);
ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
ScalFact->setValue(0.1);
TopGroupLayout->addWidget(ScalFact, 0, 1);
void VisuGUI_DeformedShapeAndScalarMapDlg::setFactor(double theFactor)
{
double i=0.1;
- while (1) { // Calculate Step & Precission
- if ( int (theFactor/i) > 0)
- break;
- else {
- i = i*0.1;
+ if ( theFactor > 0 ) {
+ while (1) { // Calculate Step & Precission
+ if ( int (theFactor/i) > 0)
+ break;
+ else
+ i = i*0.1;
}
}
ScalFact->setSingleStep(i);
-
ScalFact->setValue(theFactor);
}
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
- ScalFact = new QtxDoubleSpinBox (1.0E-20, 1.0E+38, 0.1, aPrecision*(-1), 38, TopGroup);
+ ScalFact = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 38, TopGroup);
ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
ScalFact->setValue(0.1);
TopGroupLayout->addWidget(ScalFact, 0, 1);
void VisuGUI_DeformedShapeDlg::setFactor(double theFactor)
{
double i=0.1;
- while (1) { // Calculate Step & Precission
- if ( int (theFactor/i) > 0)
- break;
- else {
- i = i*0.1;
+ if (theFactor > 0) {
+ while (1) { // Calculate Step & Precission
+ if ( int (theFactor/i) > 0)
+ break;
+ else
+ i = i*0.1;
}
}
ScalFact->setSingleStep(i);
-
ScalFact->setValue(theFactor);
}
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
- ScalFact = new QtxDoubleSpinBox( 1e-20, 1.0E+38, 0.1, aPrecision*(-1), 32, TopGroup );
+ ScalFact = new QtxDoubleSpinBox( 0, 1.0E+38, 0.1, aPrecision*(-1), 32, TopGroup );
ScalFact->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ScalFact->setValue( 0.1 );
void VisuGUI_VectorsDlg::setScaleFactor( double theFactor )
{
double i=0.1;
- while (1) { // Calculate Step & Precission
- if ( int (theFactor/i) > 0)
- break;
- else {
- i = i*0.1;
+ if (theFactor > 0) { // Calculate Step & Precission
+ while (1) {
+ if ( int (theFactor/i) > 0)
+ break;
+ else
+ i = i*0.1;
}
}
ScalFact->setSingleStep(i);
-
ScalFact->setValue( theFactor );
}