mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactor and rename QIconProvider -> IconProvider (#5893)
* Refactor and rename QIconProvider -> IconProvider * Generate icons on demand as unique_ptrs
This commit is contained in:
@@ -211,7 +211,11 @@ void PdmUiComboBoxEditor::configureAndUpdateUi(const QString& uiConfigName)
|
||||
{
|
||||
for (const auto& option : options)
|
||||
{
|
||||
m_comboBox->addItem(option.icon(), option.optionUiText());
|
||||
auto icon = option.icon();
|
||||
if (icon)
|
||||
m_comboBox->addItem(*icon, option.optionUiText());
|
||||
else
|
||||
m_comboBox->addItem(option.optionUiText());
|
||||
m_comboBox->setIconSize(m_attributes.iconSize);
|
||||
}
|
||||
m_comboBox->setCurrentIndex(uiField()->uiValue().toInt());
|
||||
|
||||
Reference in New Issue
Block a user