#include <TopExp.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
+#include <Precision.hxx>
#include <GEOMImpl_Types.hxx>
// min, max, step and decimals for spin boxes & initial values
double aScaleFactor = 2.0;
double aScaleStep = 0.5;
+ double aScaleMin = Precision::Confusion() * 10.0;
initSpinBox(GroupVecH->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
GroupVecH->SpinBox_DX->setValue(100.0);
GroupDXDYDZ->SpinBox_DY->setValue(0.0);
GroupDXDYDZ->SpinBox_DZ->setValue(0.0);
- initSpinBox(GroupVecH->SpinBox_DY, 0.0, COORD_MAX, aScaleStep, "parametric_precision" );
- initSpinBox(Group2Points->SpinBox1, 0.0, COORD_MAX, aScaleStep, "parametric_precision" );
- initSpinBox(GroupDXDYDZ->SpinBox_SC, 0.0, COORD_MAX, aScaleStep, "parametric_precision" );
+ initSpinBox(GroupVecH->SpinBox_DY, aScaleMin, COORD_MAX, aScaleStep, "parametric_precision" );
+ initSpinBox(Group2Points->SpinBox1, aScaleMin, COORD_MAX, aScaleStep, "parametric_precision" );
+ initSpinBox(GroupDXDYDZ->SpinBox_SC, aScaleMin, COORD_MAX, aScaleStep, "parametric_precision" );
GroupVecH->SpinBox_DY->setValue(aScaleFactor);
Group2Points->SpinBox1->setValue(aScaleFactor);
myPoint2.nullify();
myVec.nullify();
+ showOnlyPreviewControl();
+
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
resize(minimumSizeHint());
SelectionIntoArgument();
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void GenerationGUI_PrismDlg::ClickOnOk()
{
+ setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}
}
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void GenerationGUI_PrismDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ processPreview();
}
//=================================================================================
GroupDXDYDZ->SpinBox_SC->setEnabled(!GroupDXDYDZ->CheckBox1->isChecked() &&
GroupDXDYDZ->CheckBox2->isChecked()); // scale factor
- displayPreview();
+ processPreview();
}
//=================================================================================
GroupDXDYDZ->TextLabel5->setEnabled(GroupDXDYDZ->CheckBox2->isChecked());
GroupDXDYDZ->SpinBox_SC->setEnabled(GroupDXDYDZ->CheckBox2->isChecked());
- displayPreview();
+ processPreview();
}
//=================================================================================