Assembly: Replace "Activated" property by the core "Suppressed" mecha… (#22409)
* Assembly: Replace "Activated" property by the core "Suppressed" mechanism. * Fix inaccuracy * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * move the change to migrationScript5 function * Update JointObject.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -404,8 +404,8 @@ void setJointActivated(const App::DocumentObject* joint, bool val)
|
||||
return;
|
||||
}
|
||||
|
||||
if (auto propActivated = joint->getPropertyByName<App::PropertyBool>("Activated")) {
|
||||
propActivated->setValue(val);
|
||||
if (auto propSuppressed = joint->getPropertyByName<App::PropertyBool>("Suppressed")) {
|
||||
propSuppressed->setValue(!val);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,8 +415,8 @@ bool getJointActivated(const App::DocumentObject* joint)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (const auto propActivated = joint->getPropertyByName<App::PropertyBool>("Activated")) {
|
||||
return propActivated->getValue();
|
||||
if (const auto propActivated = joint->getPropertyByName<App::PropertyBool>("Suppressed")) {
|
||||
return !propActivated->getValue();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user