Fix of INT PAL 0051918: note 0504992: Additional checks were added to show the friendly messages about incorrect input data.

This commit is contained in:
akl 2013-12-03 10:21:43 +00:00
parent a6c6fefb15
commit 6cd43e071f
4 changed files with 99 additions and 0 deletions

View File

@ -871,18 +871,45 @@ bool AdvancedGUI_PipeTShapeDlg::isValid (QString& msg)
ok = LReductionGroupParams->SpinBox2->isValid(msg, !IsPreview()) && ok;
ok = LReductionGroupParams->SpinBox3->isValid(msg, !IsPreview()) && ok;
ok = LReductionGroupParams->SpinBox4->isValid(msg, !IsPreview()) && ok;
if(MainTubeGroupParams->SpinBox_DX->value() == LReductionGroupParams->SpinBox1->value()) {
msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L") + "\n";
ok = false;
}
if(MainTubeGroupParams->SpinBox_DX->value() + MainTubeGroupParams->SpinBox_DY->value() ==
LReductionGroupParams->SpinBox1->value() + LReductionGroupParams->SpinBox2->value()) {
msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L") + "\n";
ok = false;
}
}
if (RReductionGroupParams->GroupBox1->isChecked()) {
ok = RReductionGroupParams->SpinBox1->isValid(msg, !IsPreview()) && ok;
ok = RReductionGroupParams->SpinBox2->isValid(msg, !IsPreview()) && ok;
ok = RReductionGroupParams->SpinBox3->isValid(msg, !IsPreview()) && ok;
ok = RReductionGroupParams->SpinBox4->isValid(msg, !IsPreview()) && ok;
if(MainTubeGroupParams->SpinBox_DX->value() == RReductionGroupParams->SpinBox1->value()) {
msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R") + "\n";
ok = false;
}
if(MainTubeGroupParams->SpinBox_DX->value() + MainTubeGroupParams->SpinBox_DY->value() ==
RReductionGroupParams->SpinBox1->value() + RReductionGroupParams->SpinBox2->value()) {
msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R") + "\n";
ok = false;
}
}
if (IReductionGroupParams->GroupBox1->isChecked()) {
ok = IReductionGroupParams->SpinBox1->isValid(msg, !IsPreview()) && ok;
ok = IReductionGroupParams->SpinBox2->isValid(msg, !IsPreview()) && ok;
ok = IReductionGroupParams->SpinBox3->isValid(msg, !IsPreview()) && ok;
ok = IReductionGroupParams->SpinBox4->isValid(msg, !IsPreview()) && ok;
if(IncidentTubeGroupParams->SpinBox_DX->value() == IReductionGroupParams->SpinBox1->value()) {
msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I") + "\n";
ok = false;
}
if(IncidentTubeGroupParams->SpinBox_DX->value() + IncidentTubeGroupParams->SpinBox_DY->value() ==
IReductionGroupParams->SpinBox1->value() + IReductionGroupParams->SpinBox2->value()) {
msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I") + "\n";
ok = false;
}
}
ok = fabs(MainTubeGroupParams->SpinBox_DX->value()) > Precision::Confusion() && ok;

View File

@ -246,6 +246,30 @@
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
<translation>Position</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L</source>
<translation>Main pipe Radius can't be equal to Left thickness reduction Radius (rL)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L</source>
<translation>Main pipe external Radius (Radius + Width) can't be equal to Left thickness reduction external Radius (rL + wL)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R</source>
<translation>Main pipe Radius can't be equal to Right thickness reduction Radius (rR)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R</source>
<translation>Main pipe external Radius (Radius + Width) can't be equal to Right thickness reduction external Radius (rR + wR)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I</source>
<translation>Incident pipe Radius can't be equal to Incident pipe thickness reduction Radius (rI)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I</source>
<translation>Incident pipe external Radius (Radius + Width) can't be equal to Incident pipe thickness reduction external Radius (rI + wI)!</translation>
</message>
</context>
<context>
<name>AdvancedGUI_SmoothingSurfaceDlg</name>

View File

@ -246,6 +246,30 @@
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
<translation>Position</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L</source>
<translation type="unfinished">Main pipe Radius can't be equal to Left thickness reduction Radius (rL)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L</source>
<translation type="unfinished">Main pipe external Radius (Radius + Width) can't be equal to Left thickness reduction external Radius (rL + wL)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R</source>
<translation type="unfinished">Main pipe Radius can't be equal to Right thickness reduction Radius (rR)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R</source>
<translation type="unfinished">Main pipe external Radius (Radius + Width) can't be equal to Right thickness reduction external Radius (rR + wR)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I</source>
<translation type="unfinished">Incident pipe Radius can't be equal to Incident pipe thickness reduction Radius (rI)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I</source>
<translation type="unfinished">Incident pipe external Radius (Radius + Width) can't be equal to Incident pipe thickness reduction external Radius (rI + wI)!</translation>
</message>
</context>
<context>
<name>AdvancedGUI_SmoothingSurfaceDlg</name>

View File

@ -246,6 +246,30 @@
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
<translation>GEOM_PIPETSHAPE_GROUPPOS</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L</source>
<translation type="unfinished">Main pipe Radius can't be equal to Left thickness reduction Radius (rL)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L</source>
<translation type="unfinished">Main pipe external Radius (Radius + Width) can't be equal to Left thickness reduction external Radius (rL + wL)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R</source>
<translation type="unfinished">Main pipe Radius can't be equal to Right thickness reduction Radius (rR)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R</source>
<translation type="unfinished">Main pipe external Radius (Radius + Width) can't be equal to Right thickness reduction external Radius (rR + wR)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I</source>
<translation type="unfinished">Incident pipe Radius can't be equal to Incident pipe thickness reduction Radius (rI)!</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I</source>
<translation type="unfinished">Incident pipe external Radius (Radius + Width) can't be equal to Incident pipe thickness reduction external Radius (rI + wI)!</translation>
</message>
</context>
<context>
<name>AdvancedGUI_SmoothingSurfaceDlg</name>