Skip to content

Commit

Permalink
Apply the extends modifiers value in bottom to top order (#10823)
Browse files Browse the repository at this point in the history
Fixes #10811
  • Loading branch information
adeas31 committed Jun 13, 2023
1 parent 54c8505 commit 605c311
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OMEdit/OMEditLIB/Element/ElementProperties.cpp
Expand Up @@ -1449,11 +1449,14 @@ void ElementParameters::fetchElementExtendsModifiers(ModelInstance::Model *pMode
foreach (auto pElement, pModelInstance->getElements()) {
if (pElement->isExtend() && pElement->getModel()) {
auto pExtend = dynamic_cast<ModelInstance::Extend*>(pElement);
/* Issue #10811
* Go deep the in the extends hierarchy and then apply the values in bottom to top order.
*/
fetchElementExtendsModifiers(pExtend->getModel());
foreach (auto modifier, pExtend->getModifier().getModifiers()) {
Parameter *pParameter = findParameter(modifier.getName());
applyFinalStartFixedAndDisplayUnitModifiers(pParameter, modifier, true);
}
fetchElementExtendsModifiers(pExtend->getModel());
}
}
}
Expand Down

0 comments on commit 605c311

Please sign in to comment.