Update SketchObject Placement when the Support property changes

This commit is contained in:
jrheinlaender 2013-09-12 16:15:41 +02:00 committed by Stefan Tröger
parent 5c18e947e6
commit 0ab6a77442
2 changed files with 11 additions and 0 deletions

View File

@ -367,6 +367,14 @@ void Part2DObject::acceptGeometry()
// implemented in sub-classes
}
void Part2DObject::onChanged(const App::Property* prop)
{
// Update the Placement if the Support changes
if ((prop == &Support) && (Support.getValue() != NULL))
positionBySupport();
Part::Feature::onChanged(prop);
}
// Python Drawing feature ---------------------------------------------------------
namespace App {

View File

@ -107,6 +107,9 @@ public:
}
//@}
protected:
/// get called by the container when a property has changed
virtual void onChanged(const App::Property* /*prop*/);
};
typedef App::FeaturePythonT<Part2DObject> Part2DObjectPython;