Skip to content

Commit

Permalink
Auto add each prefix to displayUnit when component is an array (#12019)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Feb 23, 2024
1 parent 9704a18 commit f72a3ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions OMEdit/OMEditLIB/Element/ElementProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1848,10 +1848,10 @@ void ElementParameters::updateElementParameters()
// if displayUnit is changed OR if we already have the displayUnit modifier then set it
if (pParameter->getUnitComboBox()->isEnabled() && !unit.isEmpty() && (pParameter->hasDisplayUnit() || pParameter->getDisplayUnit().compare(unit) != 0)) {
QString displayUnitModifier;
/* Issue #11715.
* Add each prefix if parameter is an array.
/* Issue #11715 and #11839
* Add each prefix if element is an array OR parameter is an array.
*/
if (pParameter->getModelInstanceElement()->getDimensions().isArray()) {
if (mpElement->getDimensions().isArray() || pParameter->getModelInstanceElement()->getDimensions().isArray()) {
displayUnitModifier.append("each ");
}
if (pParameter->getDisplayUnitFinalEachMenu()->isFinal()) {
Expand Down

0 comments on commit f72a3ed

Please sign in to comment.