Merge branch 'master' of ssh://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad

This commit is contained in:
Yorik van Havre 2012-05-03 13:01:15 -03:00
commit 95922640a0
2 changed files with 20 additions and 1 deletions

View File

@ -100,7 +100,7 @@ void Primitive::onChanged(const App::Property* prop)
// Do not support sphere, ellipsoid and torus because the creation
// takes too long and thus is not feasible
std::string grp = (prop->getGroup() ? prop->getGroup() : "");
if (grp == "Plane" || grp == "Cylinder" || grp == "Cone" || grp == "Helix") {
if (grp == "Plane" || grp == "Cylinder" || grp == "Cone") {
try {
App::DocumentObjectExecReturn *ret = recompute();
delete ret;
@ -601,6 +601,22 @@ Helix::Helix(void)
LocalCoord.setEnums(LocalCSEnums);
}
void Helix::onChanged(const App::Property* prop)
{
if (!isRestoring()) {
if (prop == &Pitch || prop == &Height || prop == &Radius ||
prop == &Angle || prop == &LocalCoord) {
try {
App::DocumentObjectExecReturn *ret = recompute();
delete ret;
}
catch (...) {
}
}
}
Part::Feature::onChanged(prop);
}
short Helix::mustExecute() const
{
if (Pitch.isTouched())

View File

@ -236,6 +236,9 @@ public:
short mustExecute() const;
//@}
protected:
void onChanged (const App::Property* prop);
private:
static const char* LocalCSEnums[];
};