[TD]fix Tolerance format issue in dialog

This commit is contained in:
wandererfan
2023-09-02 14:10:43 -04:00
committed by WandererFan
parent 341649e1d1
commit ffad14a7ff

View File

@@ -254,8 +254,17 @@ void TaskDimension::onArbitraryChanged()
void TaskDimension::onFormatSpecifierOverToleranceChanged()
{
// Base::Console().Message("TD::onFormatSpecifierOverToleranceChanged()\n");
// if (m_blockToleranceLoop) { return; }
m_parent->getDimFeat()->FormatSpecOverTolerance.setValue(ui->leFormatSpecifierOverTolerance->text().toUtf8().constData());
if (!ui->cbArbitraryTolerances->isChecked()) {
if (ui->cbArbitraryTolerances->isChecked() ) {
// Don't do anything else if tolerance is Arbitrary
recomputeFeature();
return;
}
if (ui->cbEqualTolerance->isChecked()) {
// the under tolerance has to match this one
ui->leFormatSpecifierUnderTolerance->setText(ui->leFormatSpecifierOverTolerance->text());
m_parent->getDimFeat()->FormatSpecUnderTolerance.setValue(ui->leFormatSpecifierUnderTolerance->text().toUtf8().constData());
}
@@ -264,8 +273,16 @@ void TaskDimension::onFormatSpecifierOverToleranceChanged()
void TaskDimension::onFormatSpecifierUnderToleranceChanged()
{
// Base::Console().Message("TD::onFormatSpecifierUnderToleranceChanged()\n");
m_parent->getDimFeat()->FormatSpecUnderTolerance.setValue(ui->leFormatSpecifierUnderTolerance->text().toUtf8().constData());
if (!ui->cbArbitraryTolerances->isChecked()) {
if (ui->cbArbitraryTolerances->isChecked() ) {
// Don't do anything else if tolerance is Arbitrary
recomputeFeature();
return;
}
if (ui->cbEqualTolerance->isChecked()) {
// if EqualTolerance is checked, then underTolerance is disabled, so this shouldn't happen!
// the over tolerance has to match this one
ui->leFormatSpecifierOverTolerance->setText(ui->leFormatSpecifierUnderTolerance->text());
m_parent->getDimFeat()->FormatSpecOverTolerance.setValue(ui->leFormatSpecifierOverTolerance->text().toUtf8().constData());
}