Made the rest of the PartDesign features aware of the Body

This commit is contained in:
jrheinlaender
2013-04-21 09:24:12 +04:30
committed by Stefan Tröger
parent 4bb14de504
commit 7330d4357e
19 changed files with 923 additions and 746 deletions

View File

@@ -49,18 +49,18 @@ short DressUp::mustExecute() const
}
void DressUp::positionByBase(void)
void DressUp::positionByBaseFeature(void)
{
Part::Feature *base = static_cast<Part::Feature*>(Base.getValue());
Part::Feature *base = static_cast<Part::Feature*>(BaseFeature.getValue());
if (base && base->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))
this->Placement.setValue(base->Placement.getValue());
}
void DressUp::onChanged(const App::Property* prop)
{
if (prop == &Base) {
if (prop == &BaseFeature) {
// if attached to a sketch then mark it as read-only
this->Placement.setStatus(App::Property::ReadOnly, Base.getValue() != 0);
this->Placement.setStatus(App::Property::ReadOnly, BaseFeature.getValue() != 0);
}
Feature::onChanged(prop);