Changeset 04ccf92 in OpenModelica


Ignore:
Timestamp:
2020-10-21T18:53:49+02:00 (3 years ago)
Author:
Adrian Pop <adrian.pop@…>
Branches:
maintenance/v1.16
Children:
9b268ea7
Parents:
bfae500
git-author:
Adeel Asghar <adeel.asghar@…> (10/20/20 14:49:56)
git-committer:
Adrian Pop <adrian.pop@…> (10/21/20 18:53:49)
Message:

Add the modifier value to combo box if its not there already

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OMEdit/OMEditLIB/Element/ElementProperties.cpp

    r8dab0e9 r04ccf92  
    185185        if (index > -1) {
    186186          mpValueComboBox->setCurrentIndex(index);
    187           mpValueComboBox->lineEdit()->setText(value);
    188           mpValueComboBox->lineEdit()->setModified(valueModified);
     187        } else { // if we fail to find the value in the combobox then add it to the combobox
     188          mpValueComboBox->insertItem(1, value, value);
    189189        }
     190        mpValueComboBox->lineEdit()->setText(value);
     191        mpValueComboBox->lineEdit()->setModified(valueModified);
    190192        mpValueComboBox->blockSignals(state);
    191193      }
Note: See TracChangeset for help on using the changeset viewer.