[PD] add parameter enabling logic for pad/pocket

- currently all parameters are always enabled and thus can lead to errors like the one reported here:
https://forum.freecadweb.org/viewtopic.php?f=3&t=70266
This commit is contained in:
Uwe
2022-07-16 23:17:06 +02:00
parent e4dfc42f33
commit a8d01fa6c6
4 changed files with 67 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ using namespace PartDesign;
/* TRANSLATOR PartDesign::Pocket */
const char* Pocket::TypeEnums[]= {"Length","ThroughAll","UpToFirst","UpToFace","TwoLengths",nullptr};
const char* Pocket::TypeEnums[]= {"Length", "ThroughAll", "UpToFirst", "UpToFace", "TwoLengths", nullptr};
PROPERTY_SOURCE(PartDesign::Pocket, PartDesign::FeatureExtrude)
@@ -237,6 +237,9 @@ App::DocumentObjectExecReturn *Pocket::execute()
this->Shape.setValue(getSolid(solRes));
}
// eventually disable some settings that are not valid for the current method
updateProperties(method);
return App::DocumentObject::StdReturn;
}
catch (Standard_Failure& e) {