PartDesign: Chamfer feature corrections and improvements

========================================================

- Correction to mustExecute() to account for the new properties
- Make properties not used by the mode as read-only.
- Gui: apply() only for construction mode valid features
This commit is contained in:
Abdullah Tahiri
2020-05-14 19:35:40 +02:00
committed by abdullahtahiriyo
parent e1240fb18d
commit e4a5d8b862
3 changed files with 82 additions and 10 deletions

View File

@@ -320,9 +320,25 @@ void TaskChamferParameters::apply()
std::string name = DressUpView->getObject()->getNameInDocument();
//Gui::Command::openCommand("Chamfer changed");
ui->chamferSize->apply();
ui->chamferSize2->apply();
ui->chamferAngle->apply();
PartDesign::Chamfer* pcChamfer = static_cast<PartDesign::Chamfer*>(DressUpView->getObject());
const int chamfertype = pcChamfer->ChamferType.getValue();
switch(chamfertype) {
case 0: // "Equal distance"
ui->chamferSize->apply();
break;
case 1: // "Two distances"
ui->chamferSize->apply();
ui->chamferSize2->apply();
break;
case 2: // "Distance and Angle"
ui->chamferSize->apply();
ui->chamferAngle->apply();
break;
}
}
//**************************************************************************