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,6 +48,16 @@ public:
bool operator () (const std::pair<std::string, App::Property*>& elem) const
{
if (elem.first == propertyname) {
// flag set that property is read-only or hidden
if (elem.second->StatusBits.test(2) || elem.second->StatusBits.test(3))
return false;
App::PropertyContainer* parent = elem.second->getContainer();
if (parent) {
// flag set that property is read-only or hidden
if (parent->isReadOnly(elem.second) ||
parent->isHidden(elem.second))
return false;
}
return elem.second->isDerivedFrom
(Base::Type::fromName("App::PropertyPlacement"));
}