Set placement property to read-only for skecth/ dress up features

This commit is contained in:
wmayer
2012-04-06 12:29:18 +02:00
parent 1ec0f37af1
commit 2d2df1b1a3
6 changed files with 37 additions and 1 deletions

View File

@@ -48,4 +48,14 @@ void DressUp::positionByBase(void)
this->Placement.setValue(base->Placement.getValue());
}
void DressUp::onChanged(const App::Property* prop)
{
if (prop == &Base) {
// if attached to a sketch then mark it as read-only
this->Placement.StatusBits.set(2, Base.getValue() != 0);
}
Feature::onChanged(prop);
}
}